/* Learner and employer portal shell: a light top bar instead of the ink
   sidebar, a centred container, the player layout and the exam focus mode.
   Built phone first; the right panel becomes a bottom sheet under 900px. */

.lp-top {
  height: 60px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px; padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.lp-top .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 15px; }
.lp-top .brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand-gradient); color: #fff; display: grid; place-items: center; font-size: 13px; }
.lp-top .brand small { display: block; font-family: var(--sans); font-weight: 400; font-size: 11.5px; color: var(--muted); }
.lp-top nav { display: flex; gap: 4px; margin-left: 12px; }
.lp-top nav a { color: var(--muted); padding: 8px 12px; border-radius: var(--r-sm); font-size: 13.5px; }
.lp-top nav a:hover { background: var(--canvas); color: var(--ink); text-decoration: none; }
.lp-top nav a.active { color: var(--ink); background: var(--blue-soft); }
.lp-top .sp { flex: 1; }
.lp-top .lang-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px; }

.lp-wrap { max-width: 1100px; margin: 0 auto; padding: 28px 24px 70px; }
.lp-wrap.narrow { max-width: 820px; }
.lp-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.lp-hero h1 { font-size: 30px; }
.lp-hero p { color: var(--muted); margin-top: 6px; max-width: 60ch; }

/* Continue card: the one large moment on the learner dashboard */
.continue { display: grid; grid-template-columns: 260px 1fr; gap: 0; overflow: hidden; }
.continue .thumb { border-radius: 0; aspect-ratio: auto; min-height: 170px; }
.continue .body { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.continue .body h2 { font-size: 22px; }

/* Course cards */
.course-card { overflow: hidden; display: flex; flex-direction: column; }
.course-card .thumb { border-radius: 0; }
.course-card .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-card h3 { font-size: 15px; }

/* Lock reasons in plain words */
.lock { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.lock i { color: var(--faint); }

/* ---------- Player ---------- */
.player { display: grid; grid-template-columns: 272px 1fr 340px; grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 30px); min-height: 600px; }
.player .p-top { grid-column: 1 / -1; height: 54px; background: var(--navy); color: #e3e8f5; display: flex; align-items: center; gap: 14px; padding: 0 16px; }
.player .p-top .title b { font-family: var(--display); color: #fff; font-weight: 600; display: block; line-height: 1.15; }
.player .p-top .title span { font-size: 12px; color: #93a0c4; }
.player .p-top .sp { flex: 1; }
.player .p-top .bar { width: 160px; background: rgba(255,255,255,0.18); }
.player .p-top .bar > span { background: var(--cyan); }
.player .p-top .btn { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: #fff; }
.player .p-top .btn:hover { background: rgba(255,255,255,0.14); }
.player .p-top .pct { font-size: 12.5px; color: #c3cbe4; }

.p-rail { background: var(--surface); border-right: 1px solid var(--line); overflow: auto; padding: 14px 10px; }
.p-rail .mod { font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--ink); padding: 10px 8px 4px; }
.p-rail .mod small { display: block; font-family: var(--sans); font-weight: 400; color: var(--muted); font-size: 11.5px; }
.p-rail a.step { display: flex; align-items: center; gap: 9px; padding: 8px 8px; border-radius: 10px; color: var(--body); font-size: 13px; }
.p-rail a.step:hover { background: var(--canvas); text-decoration: none; }
.p-rail a.step.now { background: var(--blue-soft); color: var(--ink); font-weight: 500; }
.p-rail a.step .led { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: 0 0 auto; }
.p-rail a.step.done .led { background: var(--green); }
.p-rail a.step.now .led { background: var(--blue); }
.p-rail a.step.locked { color: var(--faint); }
.p-rail a.step.locked .led { background: transparent; border: 1.5px solid var(--line-strong); }
.p-rail a.step .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-rail a.step .d { font-size: 11.5px; color: var(--faint); }

.p-stage { background: var(--canvas); overflow: auto; display: flex; flex-direction: column; }
.p-stage .stage-inner { padding: 24px 28px; flex: 1; display: flex; flex-direction: column; gap: 16px; max-width: 980px; width: 100%; margin: 0 auto; }
.p-stage .step-title h1 { font-size: 24px; }
.p-stage .step-title p { color: var(--muted); margin-top: 4px; }
.video { position: relative; background: #0f1b3d; border-radius: var(--r-md); aspect-ratio: 16/9; overflow: hidden; color: #fff; display: grid; place-items: center; }
.video .scene { position: absolute; inset: 0; padding: 36px 40px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.video .scene h2 { color: #fff; font-size: 30px; }
.video .scene p { color: #c9d4f2; font-size: 16px; max-width: 48ch; }
.video .caption { position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%); background: rgba(0,0,0,0.65); color: #fff; padding: 6px 12px; border-radius: 6px; font-size: 15px; white-space: nowrap; }
.video .controls { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; background: linear-gradient(transparent, rgba(0,0,0,0.6)); display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 12.5px; }
.video .controls button { border: 0; background: transparent; color: #fff; cursor: pointer; font-size: 18px; display: grid; place-items: center; }
.video .controls .track { flex: 1; height: 4px; background: rgba(255,255,255,0.3); border-radius: 2px; position: relative; }
.video .controls .track > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--cyan); border-radius: 2px; }
.video .controls .track .mark { position: absolute; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 2px solid #fff; transform: translateX(-50%); }
.video .controls .pill-less { color: #c9d4f2; }
.video .chapters { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.video .chapters span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.35); }
.video .chapters span.on { background: #fff; }

/* the timed knowledge check slides up over the video */
.timed-check { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); color: var(--ink); border-radius: var(--r-md) var(--r-md) 0 0; padding: 18px 22px; transform: translateY(110%); transition: transform .25s ease; }
.timed-check.on { transform: translateY(0); }
.timed-check h3 { font-size: 16px; margin-bottom: 10px; }
.answers { display: grid; gap: 8px; }
.answers button { text-align: left; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; cursor: pointer; font-size: 14px; color: var(--ink); }
.answers button:hover { border-color: var(--blue); }
.answers button.right { border-color: var(--green); background: var(--green-soft); }
.answers button.wrong { border-color: var(--red); background: var(--red-soft); }

.p-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); margin-top: auto; }
.p-next .rule { font-size: 12.5px; color: var(--muted); }

.p-panel { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.p-panel .tabs { padding: 0 10px; }
.p-panel .panel-body { flex: 1; overflow: auto; padding: 16px; }
.note-item { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13px; margin-bottom: 8px; }
.note-item .at { font-size: 11.5px; color: var(--blue); font-family: var(--mono); display: block; margin-bottom: 4px; }
.tutor-msg { max-width: 94%; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; margin-bottom: 8px; }
.tutor-msg.ai { background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.tutor-msg.me { background: var(--navy); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.tutor-msg .replay { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: var(--blue); cursor: pointer; }
.transcript p { font-size: 13.5px; line-height: 1.6; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.transcript p.now { background: var(--blue-soft); color: var(--ink); }
.transcript p span { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-right: 8px; }

/* ---------- Exam focus mode ---------- */
.exam { display: grid; grid-template-columns: 240px 1fr; grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 30px); min-height: 600px; }
.exam .e-top { grid-column: 1 / -1; height: 54px; background: var(--navy); color: #e3e8f5; display: flex; align-items: center; gap: 16px; padding: 0 20px; }
.exam .e-top b { font-family: var(--display); color: #fff; }
.exam .e-top .sp { flex: 1; }
.exam .timer { font-family: var(--mono); font-size: 18px; color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.exam .timer small { font-family: var(--sans); font-size: 11.5px; color: #93a0c4; }
.e-nav { background: var(--surface); border-right: 1px solid var(--line); padding: 16px; overflow: auto; }
.e-nav .qgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.e-nav .qgrid button { aspect-ratio: 1; border: 1px solid var(--line-strong); background: #fff; border-radius: 8px; font-size: 12.5px; cursor: pointer; color: var(--ink); }
.e-nav .qgrid button.done { background: var(--navy); color: #fff; border-color: var(--navy); }
.e-nav .qgrid button.flag { border-color: var(--amber); color: var(--amber); }
.e-nav .qgrid button.now { box-shadow: 0 0 0 2px var(--blue); }
.e-stage { overflow: auto; padding: 32px; }
.e-q { max-width: 760px; margin: 0 auto; }
.e-q .qnum { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.e-q h2 { font-size: 20px; margin-bottom: 18px; line-height: 1.35; }
.e-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }

/* ---------- Certificate ---------- */
.cert { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 44px 48px; position: relative; overflow: hidden; }
.cert::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: var(--brand-gradient); }
.cert h1 { font-size: 34px; }
.cert .who { font-family: var(--display); font-size: 26px; margin: 18px 0 6px; }
.cert .qr { width: 96px; height: 96px; border: 1px solid var(--line); border-radius: 8px; background: repeating-linear-gradient(90deg, #16202c 0 4px, #fff 4px 8px), repeating-linear-gradient(0deg, #16202c 0 4px, #fff 4px 8px); background-blend-mode: multiply; }

/* ---------- Employer grid ---------- */
.cred-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.cred-grid th, .cred-grid td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.cred-grid th { font-weight: 500; color: var(--muted); font-size: 12px; background: var(--surface-2); }
.cred-grid .cell { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.cred-grid .cell::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--line-strong); }
.cred-grid .cell.ok::before { background: var(--green); }
.cred-grid .cell.soon::before { background: var(--amber); }
.cred-grid .cell.lapsed::before { background: var(--red); }
.cred-grid .cell.none::before { background: transparent; border: 1.5px solid var(--line-strong); }

@media (max-width: 900px) {
  .lp-top { padding: 0 14px; gap: 10px; }
  .lp-top nav { display: none; }
  .lp-wrap { padding: 18px 16px 70px; }
  .continue { grid-template-columns: 1fr; }
  .player { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .p-rail { display: none; }
  .p-panel { border-left: 0; border-top: 1px solid var(--line); }
  .p-stage .stage-inner { padding: 14px 16px; }
  .video .scene h2 { font-size: 20px; }
  .video .scene p { font-size: 13px; }
  .exam { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .e-nav { display: none; }
  .e-stage { padding: 18px 16px; }
  .cert { padding: 28px 22px; }
}
