:root {
  --ink: #161616;
  --ink-2: #525252;
  --ink-3: #8d8d8d;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --line: #e0e4ec;
  --navy: #071629;
  --navy-2: #0d2340;
  --blue: #0f62fe;
  --blue-soft: #e5edff;
  --cyan: #33b1ff;
  --purple: #8a3ffc;
  --purple-soft: #f1e9ff;
  --green: #198038;
  --green-soft: #defbe6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(7, 22, 41, .06), 0 8px 24px rgba(7, 22, 41, .06);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 4px 14px rgba(15, 98, 254, .35);
}
.brand-mark img { width: 26px; height: 26px; filter: invert(1); }
.brand-text { line-height: 1.1; }
.brand-text small { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.brand-text strong { font-size: 19px; font-weight: 600; }

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--navy);
}
.login-hero {
  position: relative; overflow: hidden; color: #fff; padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(900px 500px at 10% 110%, rgba(138, 63, 252, .45), transparent 60%),
    radial-gradient(700px 500px at 90% -10%, rgba(15, 98, 254, .55), transparent 60%),
    var(--navy);
}
.login-hero .big-mark {
  position: absolute; right: -80px; bottom: -60px; width: 460px; height: 460px;
  color: rgba(255, 255, 255, .06);
}
.login-hero h1 { font-size: clamp(32px, 4vw, 52px); font-weight: 300; line-height: 1.1; margin: 0 0 16px; max-width: 14ch; }
.login-hero h1 b { font-weight: 600; }
.login-hero p { color: rgba(255, 255, 255, .72); font-size: 17px; max-width: 42ch; margin: 0; }
.login-hero .meta { display: flex; gap: 28px; color: rgba(255, 255, 255, .6); font-size: 14px; position: relative; }
.login-hero .meta b { display: block; color: #fff; font-size: 22px; font-weight: 600; }

.login-panel { background: var(--surface); display: grid; place-items: center; padding: 48px 24px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 28px; font-weight: 400; margin: 0 0 6px; }
.login-card .sub { color: var(--ink-2); margin: 0 0 32px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; letter-spacing: .02em; }
.field input {
  width: 100%; font: inherit; font-size: 16px; padding: 13px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: #f8f9fc; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(15, 98, 254, .15); }
.btn-primary {
  width: 100%; border: 0; border-radius: 8px; padding: 14px 18px; font-size: 16px; font-weight: 500;
  color: #fff; background: var(--blue); display: flex; justify-content: space-between; align-items: center;
  transition: background .15s, transform .05s;
}
.btn-primary:hover { background: #0353e9; }
.btn-primary:active { transform: translateY(1px); }
.error {
  display: none; background: #fff1f1; color: #a2191f; border: 1px solid #ffd7d9;
  padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 20px;
}
.error.show { display: block; }
.login-foot { margin-top: 28px; font-size: 13px; color: var(--ink-3); }

/* ---------- App shell ---------- */
.topbar {
  background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar .brand-mark { width: 34px; height: 34px; border-radius: 8px; }
.topbar .brand-mark img { width: 22px; height: 22px; }
.topbar .brand-text strong { font-size: 16px; }
.topbar .brand-text small { font-size: 11px; }
.signout {
  color: rgba(255, 255, 255, .8); text-decoration: none; font-size: 14px; padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px;
}
.signout:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.hero {
  color: #fff;
  background:
    radial-gradient(800px 300px at 0% 120%, rgba(138, 63, 252, .35), transparent 60%),
    radial-gradient(700px 320px at 100% -20%, rgba(15, 98, 254, .5), transparent 60%),
    var(--navy-2);
}
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 40px 24px 88px; }
.crumbs { font-size: 14px; color: rgba(255, 255, 255, .65); margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; color: rgba(255, 255, 255, .85); }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.hero h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 300; margin: 0 0 10px; }
.hero h1 b { font-weight: 600; }
.hero p { margin: 0; color: rgba(255, 255, 255, .72); font-size: 17px; max-width: 64ch; }

main { max-width: 1200px; margin: -56px auto 0; padding: 0 24px 64px; position: relative; }

/* ---------- Course tiles ---------- */
.course-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.course-tile {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid var(--line); transition: transform .15s, box-shadow .15s;
}
.course-tile:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(7, 22, 41, .06), 0 18px 40px rgba(7, 22, 41, .12); }
.course-banner {
  height: 150px; position: relative; padding: 22px 24px; color: #fff; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
}
.course-banner.day1 { background: linear-gradient(135deg, #0043ce, #0f62fe 55%, #33b1ff); }
.course-banner.day2 { background: linear-gradient(135deg, #491d8b, #8a3ffc 55%, #d4bbff); }
.course-banner .bg-mark { position: absolute; right: -24px; top: -24px; width: 200px; height: 200px; color: rgba(255, 255, 255, .14); }
.course-banner .pill {
  align-self: flex-start; font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255, 255, 255, .2); padding: 5px 10px; border-radius: 999px; position: relative;
}
.course-banner .day-num { font-size: 48px; font-weight: 300; line-height: 1; position: relative; }
.course-body { padding: 22px 24px 24px; flex: 1; display: flex; flex-direction: column; }
.course-body h2 { margin: 0 0 8px; font-size: 21px; font-weight: 600; }
.course-body p { margin: 0 0 18px; color: var(--ink-2); line-height: 1.5; }
.course-topics { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.course-topics li { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--bg); color: var(--ink-2); }
.course-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--ink-2); }
.progress { flex: 1; max-width: 220px; }
.progress-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 6px; }
.progress-bar span { display: block; height: 100%; background: var(--blue); border-radius: inherit; transition: width .3s; }
.day2 ~ .course-body .progress-bar span, .progress-bar.day2 span { background: var(--purple); }
.go { font-weight: 500; color: var(--blue); white-space: nowrap; }
.go.day2 { color: var(--purple); }

/* ---------- Module list ---------- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.module-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; text-decoration: none; display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s, border-color .15s; position: relative;
}
.module-card:hover { transform: translateY(-2px); border-color: var(--accent, var(--blue)); }
.module-num {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 600; font-size: 17px; color: var(--accent, var(--blue)); background: var(--accent-soft, var(--blue-soft));
}
.module-card h3 { margin: 4px 0 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.module-card p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.module-meta { margin-top: auto; padding-top: 10px; display: flex; gap: 14px; font-size: 13px; color: var(--ink-3); }
.done-badge {
  position: absolute; top: 18px; right: 18px; font-size: 12px; font-weight: 500;
  color: var(--green); background: var(--green-soft); padding: 4px 9px; border-radius: 999px;
}

/* ---------- Module detail ---------- */
.module-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.module-layout > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.module-layout > aside { position: sticky; top: 84px; }
.panel code, .callout code, .steps code {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .88em;
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
}
.panel pre {
  margin: 14px 0 0; padding: 16px 18px; border-radius: 10px; overflow-x: auto;
  background: var(--navy); color: #d0e2ff; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; line-height: 1.6;
}
.panel pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.panel table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.panel th {
  text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.panel td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; color: var(--ink-2); }
.panel td:first-child { color: var(--ink); font-weight: 500; }
.panel tr:last-child td { border-bottom: 0; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; counter-reset: f; }
.flow li {
  position: relative; padding: 16px 16px 16px; border-radius: 10px; background: var(--accent-soft, var(--blue-soft));
  display: flex; flex-direction: column; gap: 6px; counter-increment: f;
}
.flow li::before {
  content: counter(f); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #fff; background: var(--accent, var(--blue));
}
.flow b { color: var(--accent, var(--blue)); font-size: 15px; }
.flow span { color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.callout {
  border-left: 4px solid var(--accent, var(--blue)); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px; line-height: 1.6; color: var(--ink-2); box-shadow: var(--shadow);
}
.callout b { color: var(--ink); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 4px; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 14px 48px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; font-weight: 600; color: var(--accent, var(--blue)); background: var(--accent-soft, var(--blue-soft));
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 38px; bottom: 2px; width: 2px; background: var(--line); }
.steps li > b { display: block; margin: 5px 0 4px; }
.steps p { margin: 0; }
.lab-tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: #8e4b00; background: #fff2e0; padding: 3px 8px; border-radius: 999px; vertical-align: middle;
}
.panel h2 .lab-tag { margin-right: 6px; }
.panel h2 { margin: 0 0 14px; font-size: 18px; font-weight: 600; }
.panel p { color: var(--ink-2); line-height: 1.6; margin: 0 0 12px; }
.objectives { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.objectives li { display: flex; gap: 12px; line-height: 1.5; color: var(--ink); }
.objectives li::before {
  content: ""; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 2px;
  background: var(--accent, var(--blue)); transform: rotate(45deg);
}
.files { display: grid; gap: 10px; }
.file {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 10px;
  border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, background .15s;
}
.file:hover { border-color: var(--accent, var(--blue)); background: #fafbff; }
.file-icon {
  width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; flex: none;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; color: #fff; background: var(--ink-2);
}
.file-icon.pdf { background: #da1e28; }
.file-icon.pptx, .file-icon.ppt { background: #d2691e; }
.file-icon.docx, .file-icon.doc { background: #0043ce; }
.file-icon.mp4, .file-icon.video { background: #6929c4; }
.file-icon.link { background: #007d79; }
.file-name { font-weight: 500; }
.file-sub { font-size: 13px; color: var(--ink-3); }
.empty {
  border: 1.5px dashed var(--line); border-radius: 10px; padding: 26px; text-align: center; color: var(--ink-3); font-size: 14px;
}
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side-list a {
  display: flex; gap: 10px; align-items: baseline; padding: 9px 10px; border-radius: 8px;
  text-decoration: none; font-size: 14px; color: var(--ink-2);
}
.side-list a:hover { background: var(--bg); color: var(--ink); }
.side-list a.current { background: var(--accent-soft, var(--blue-soft)); color: var(--accent, var(--blue)); font-weight: 500; }
.side-list .n { width: 22px; flex: none; font-variant-numeric: tabular-nums; opacity: .7; }
.side-list .tick { margin-left: auto; color: var(--green); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px;
  padding: 11px 16px; font-size: 15px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { border-color: var(--ink-3); }
.btn.solid { background: var(--accent, var(--blue)); border-color: transparent; color: #fff; }
.btn.solid:hover { filter: brightness(.92); }
.btn.complete { background: var(--green-soft); color: var(--green); border-color: transparent; }
.spacer { flex: 1; }

footer.site { text-align: center; color: var(--ink-3); font-size: 13px; padding: 0 24px 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { padding: 32px 24px; min-height: 300px; gap: 32px; }
  .login-hero .big-mark { width: 280px; height: 280px; right: -60px; bottom: -40px; }
  .course-grid { grid-template-columns: 1fr; }
  .module-layout { grid-template-columns: minmax(0, 1fr); }
  .module-layout > aside { position: static; }
}
@media (max-width: 520px) {
  .topbar-inner, .hero-inner, main { padding-left: 16px; padding-right: 16px; }
  .panel { padding: 20px; }
  .brand-text small { display: none; }
}
.lab-tag.demo { color: #6e32c9; background: #f1e9ff; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.btn.play { font-size: 14px; padding: 9px 14px; }
.steps code, .panel p code, .objectives code { overflow-wrap: anywhere; }

/* ---------- Instructor ---------- */
.top-right { display: flex; align-items: center; gap: 12px; }
.toplink { color: #fff; text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.toplink:hover { text-decoration: underline; }
.role-pill { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: #fff2e0; color: #8e4b00; padding: 3px 8px; border-radius: 999px; }
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; box-shadow: var(--shadow); }
.tabs a { flex: 1; text-align: center; text-decoration: none; padding: 10px 12px; border-radius: 9px; font-size: 15px; color: var(--ink-2); }
.tabs a.on { background: var(--accent, var(--blue)); color: #fff; font-weight: 500; }
.tabs .count { display: inline-block; min-width: 22px; padding: 1px 7px; margin-left: 4px; border-radius: 999px; font-size: 12px; background: rgba(127, 127, 127, .18); }
.screen-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.screen-head h2 { margin: 2px 0 2px; }
.screen-num { flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-weight: 600; color: #fff; background: var(--accent, var(--blue)); }
.screen-time { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.shot { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
.shot img { display: block; width: 100%; height: auto; }
.panel h3 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 10px; }
.script p { color: var(--ink); font-size: 16px; line-height: 1.7; margin: 0 0 12px; }
.tip { margin-top: 8px; padding: 12px 14px; border-radius: 8px; background: #fff8e6; color: #5c4400; font-size: 14px; line-height: 1.5; }
.script-count { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; padding-left: 8px; }
.script-count.has { color: var(--green); font-weight: 500; }
@media (max-width: 520px) { .toplink { font-size: 0; } .toplink .role-pill { font-size: 11px; } }

/* ---------- Resources ---------- */
#toplinks { display: flex; gap: 18px; align-items: center; }
.resources-strip {
  margin-top: 24px; display: flex; align-items: center; gap: 16px; padding: 18px 22px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.resources-strip:hover { border-color: var(--blue); }
.resources-strip .go { margin-left: auto; }
.g-count { font-size: 13px; color: var(--ink-3); }
.g-search input {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 8px; outline: none;
  border: 1px solid var(--line); background: #f8f9fc; color: var(--ink);
}
.g-search input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(15, 98, 254, .15); }
.g-letters { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 6px; }
.g-letters a { min-width: 30px; text-align: center; padding: 5px 6px; border-radius: 6px; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--blue); background: var(--blue-soft); }
.g-letters a:hover { background: var(--blue); color: #fff; }
.glossary { margin: 0; }
.g-group h3 { scroll-margin-top: 90px; font-size: 20px; letter-spacing: 0; text-transform: none; color: var(--blue); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin: 22px 0 4px; }
.g-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.g-group .g-item:last-child { border-bottom: 0; }
.g-item dt { font-weight: 600; font-size: 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.g-aka { font-weight: 400; font-size: 13px; color: var(--ink-3); }
.g-item dd { margin: 4px 0 0; color: var(--ink-2); line-height: 1.6; }
.g-item code { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .88em; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.g-mods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.g-mods a { font-size: 12px; text-decoration: none; padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.g-mods a:hover { border-color: var(--blue); color: var(--blue); }
.file-desc { font-size: 14px; color: var(--ink-2); line-height: 1.55; margin: 2px 0 4px; }
.files .btn { justify-self: start; font-size: 14px; padding: 9px 14px; }
.module-layout > aside:has(.docs-list) { position: static; display: grid; gap: 20px; padding: 0; background: none; border: 0; box-shadow: none; }
.docs-list a { align-items: center; }
.docs-list b { color: var(--ink); font-weight: 500; }
.docs-list .ext { margin-left: auto; color: var(--ink-3); }
@media (max-width: 520px) { #toplinks { gap: 12px; } .toplink { font-size: 14px; } .tl-text, .topbar .brand-text { display: none; } .topbar-inner { gap: 10px; } .signout { padding: 6px 10px; font-size: 13px; } }
