/* ============ The Automation Lab — design tokens ============ */
:root {
  --paper: #eef1f5;
  --surface: #ffffff;
  --ink: #16202e;
  --ink-soft: #51607a;
  --line: #d9dfe8;
  --web: #2f9e44;        /* Selenium green — web phase rail */
  --web-soft: #e3f3e6;
  --mobile: #7048b6;     /* Appium purple — mobile phase rail */
  --mobile-soft: #efe8fa;
  --intro: #33415c;
  --intro-soft: #e7ebf2;
  --gold: #b08a2e;
  --gold-soft: #f7efdb;
  --dark: #10151e;       /* editor / terminal / device insets */
  --dark-2: #1a2230;
  --pass: #2f9e44;
  --fail: #d64545;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', Menlo, monospace;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 32, 46, .06), 0 8px 28px rgba(22, 32, 46, .07);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; font-size: 14px; }
.hidden { display: none !important; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--ink-soft); font-family: var(--font-display); }

/* ============ shell layout ============ */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; cursor: pointer; }
.brand-mark { font-size: 26px; }
.brand-text { font-family: var(--font-display); font-size: 15px; line-height: 1.1; letter-spacing: .3px; color: var(--ink-soft); }
.brand-text b { color: var(--ink); font-size: 17px; }
.nav { flex: 1; overflow-y: auto; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav a {
  padding: 9px 12px; border-radius: 8px; font-size: 13.5px; color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px; border-left: 3px solid transparent;
}
.nav a:hover { background: var(--paper); color: var(--ink); }
.nav a.active { background: var(--intro-soft); color: var(--ink); font-weight: 600; }
.nav-section.phase-web.active, .nav-section.phase-web:not(.locked):hover { border-left-color: var(--web); }
.nav-section.phase-mobile.active, .nav-section.phase-mobile:not(.locked):hover { border-left-color: var(--mobile); }
.nav-section.phase-capstone.active { border-left-color: var(--gold); }
.nav a.locked { opacity: .45; cursor: not-allowed; }
.nav-done { margin-left: auto; color: var(--pass); font-weight: 700; }
.nav-pct { margin-left: auto; font-size: 11px; color: var(--ink-soft); background: var(--paper); padding: 1px 7px; border-radius: 20px; }
.sidebar-foot { border-top: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.lang-switch { display: flex; background: var(--paper); border-radius: 8px; padding: 3px; }
.lang-switch button {
  flex: 1; border: 0; background: transparent; padding: 7px 4px; border-radius: 6px;
  font-size: 12.5px; color: var(--ink-soft); font-weight: 600;
}
.lang-switch button.on { background: var(--ink); color: #fff; }
.user-chip { display: flex; align-items: center; gap: 8px; }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--intro); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-btn { border: 0; background: transparent; font-size: 15px; color: var(--ink-soft); }
.logout-btn:hover { color: var(--fail); }
.content { flex: 1; padding: 34px 44px 80px; max-width: 1200px; min-width: 0; }

/* ============ shared bits ============ */
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: var(--ink-soft); margin-bottom: 6px; }
h1 { font-family: var(--font-display); font-size: 30px; letter-spacing: -.3px; }
h2 { font-family: var(--font-display); font-size: 20px; margin: 26px 0 10px; }
.crumb { font-size: 13px; color: var(--ink-soft); display: inline-block; margin-bottom: 10px; }
.crumb:hover { color: var(--ink); }
.btn-cta {
  display: inline-block; background: var(--ink); color: #fff; border: 0; border-radius: 8px;
  padding: 11px 22px; font-size: 14px; font-weight: 600; font-family: var(--font-display); letter-spacing: .3px;
}
.btn-cta:hover { background: #253349; }
.btn-cta.ghost { background: var(--web-soft); color: var(--web); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.callout { background: var(--gold-soft); border-left: 3px solid var(--gold); padding: 12px 16px; border-radius: 6px; margin: 14px 0; font-size: 14px; }

/* toasts */
#toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 400; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--ink); color: #fff; border-radius: 10px; padding: 12px 18px; font-size: 14px;
  display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px); transition: all .35s ease; max-width: 380px;
}
.toast.show { opacity: 1; transform: none; }
.toast-icon { font-size: 20px; }

/* ============ auth ============ */
.auth-wrap { display: flex; min-height: 100vh; }
.auth-hero {
  flex: 1.1; background: var(--dark); color: #e8edf5; display: grid; place-items: center; padding: 40px;
  background-image: radial-gradient(ellipse at 20% 10%, rgba(112, 72, 182, .25), transparent 55%),
                    radial-gradient(ellipse at 85% 90%, rgba(47, 158, 68, .22), transparent 55%);
}
.auth-hero-inner { max-width: 430px; }
.auth-logo { font-size: 42px; margin-bottom: 14px; }
.auth-hero h1 { font-size: 46px; line-height: 1.05; margin-bottom: 18px; }
.auth-tag { color: #aeb9cc; font-size: 15.5px; }
.auth-rails { margin-top: 30px; display: flex; flex-direction: column; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; }
.rail-web { color: #6fd287; }
.rail-mobile { color: #b79aec; }
.rail-bdd { color: #63cbb8; }
.auth-card {
  flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 48px 9%;
  background: var(--surface); max-width: 560px;
}
.auth-card h2 { font-family: var(--font-display); font-size: 24px; margin-bottom: 22px; }
.auth-card form { display: flex; flex-direction: column; gap: 15px; }
.auth-card label, .card form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.auth-card input, .card form input {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14.5px; background: var(--paper);
}
.auth-card input:focus, .card form input:focus { outline: 2px solid var(--intro); background: #fff; }
.reg-lang { display: flex; gap: 10px; }
.reg-lang-opt {
  flex: 1; flex-direction: row !important; align-items: center; gap: 8px !important;
  border: 1px solid var(--line); padding: 10px 12px; border-radius: 8px; cursor: pointer; font-weight: 600;
}
.reg-lang-opt:has(input:checked) { border-color: var(--ink); background: var(--intro-soft); }
.auth-err { background: #fdecec; color: var(--fail); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; }
.auth-alt { margin-top: 18px; font-size: 13.5px; color: var(--ink-soft); }
.auth-alt a { color: var(--ink); font-weight: 600; text-decoration: underline; }

/* ============ dashboard ============ */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.dash-stats { display: flex; gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; text-align: center; box-shadow: var(--shadow); }
.stat b { font-family: var(--font-display); font-size: 22px; }
.stat b span { color: var(--ink-soft); font-size: 14px; }
.stat small { display: block; color: var(--ink-soft); font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; }

.pipeline { position: relative; padding-left: 8px; }
.pipe-node { position: relative; display: flex; gap: 18px; padding-bottom: 26px; cursor: pointer; }
.pipe-node.locked { cursor: default; }
.pipe-rail { position: absolute; left: 21px; top: 44px; bottom: -2px; width: 3px; background: var(--line); border-radius: 2px; }
.pipe-node:last-child .pipe-rail { display: none; }
.pipe-node.phase-web .pipe-rail { background: linear-gradient(var(--web), var(--line)); }
.pipe-node.phase-mobile .pipe-rail { background: linear-gradient(var(--mobile), var(--line)); }
.pipe-node.complete .pipe-rail { background: var(--pass); }
.pipe-dot {
  width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 19px; flex-shrink: 0; z-index: 1; box-shadow: var(--shadow);
}
.pipe-node.phase-web .pipe-dot { border-color: var(--web); }
.pipe-node.phase-mobile .pipe-dot { border-color: var(--mobile); }
.pipe-node.phase-capstone .pipe-dot { border-color: var(--gold); }
.pipe-node.complete .pipe-dot { background: var(--pass); border-color: var(--pass); color: #fff; }
.pipe-node.locked .pipe-dot { border-color: var(--line); filter: grayscale(1); opacity: .7; }
.pipe-card {
  flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
}
.pipe-node:not(.locked):hover .pipe-card { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(22,32,46,.08), 0 14px 40px rgba(22,32,46,.1); }
.pipe-node.locked .pipe-card { opacity: .62; }
.pipe-phase { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.8px; color: var(--ink-soft); }
.pipe-node.phase-web .pipe-phase { color: var(--web); }
.pipe-node.phase-mobile .pipe-phase { color: var(--mobile); }
.pipe-node.phase-capstone .pipe-phase { color: var(--gold); }
.pipe-card h3 { font-family: var(--font-display); font-size: 17.5px; margin: 3px 0 4px; }
.pipe-card p { color: var(--ink-soft); font-size: 13.5px; max-width: 640px; }
.pipe-meta { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--ink-soft); flex-wrap: wrap; }
.pipe-pct { margin-left: auto; font-weight: 700; color: var(--ink); }
.pipe-bar { height: 5px; background: var(--paper); border-radius: 4px; margin-top: 9px; overflow: hidden; }
.pipe-bar i { display: block; height: 100%; background: var(--pass); border-radius: 4px; transition: width .4s ease; }
.pipe-bar.big { height: 8px; max-width: 520px; margin-top: 14px; background: rgba(255,255,255,.35); }

.badge-strip h2 { margin-top: 34px; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px;
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft);
  filter: grayscale(1); opacity: .55;
}
.badge.earned { filter: none; opacity: 1; border-color: var(--gold); background: var(--gold-soft); color: var(--ink); font-weight: 600; }
.badge-icon { font-size: 17px; }

/* ============ course/section ============ */
.course-head { border-radius: var(--radius); padding: 26px 30px; margin-bottom: 24px; color: #fff; background: var(--intro); box-shadow: var(--shadow); }
.course-head.phase-web { background: linear-gradient(120deg, #1d6b30, var(--web)); }
.course-head.phase-mobile { background: linear-gradient(120deg, #4b2e85, var(--mobile)); }
.course-head.phase-capstone { background: linear-gradient(120deg, #7d6220, var(--gold)); }
.course-head .eyebrow { color: rgba(255,255,255,.75); }
.course-head p { color: rgba(255,255,255,.85); max-width: 720px; margin-top: 6px; }
.item-list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; align-items: center; gap: 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.item:hover { transform: translateX(3px); }
.item.done { border-left: 4px solid var(--pass); }
.item-num { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); width: 26px; text-align: center; }
.item-kind { font-size: 19px; }
.item-body { flex: 1; min-width: 0; }
.item-body b { display: block; font-size: 15px; }
.item-body small { color: var(--ink-soft); font-size: 12.5px; }
.item-tail { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; font-weight: 600; }
.item.done .item-tail { color: var(--pass); }
.capstone-req { margin: 16px 0 0 20px; color: var(--ink-soft); font-size: 14px; display: grid; gap: 5px; }

/* ============ lesson & article ============ */
.lesson-top { margin-bottom: 18px; }
.lesson-desc { color: var(--ink-soft); margin-top: 5px; max-width: 760px; }
/* sits at the foot of the lesson: finish the reading, then mark it done and move on */
.lesson-actions {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  max-width: 860px; margin: 20px 0 8px; padding-top: 20px; border-top: 1px solid var(--line);
}
.lesson-nav { margin-left: auto; display: flex; gap: 18px; font-size: 13.5px; }
.lesson-nav a { color: var(--ink-soft); font-weight: 600; }
.lesson-nav a:hover { color: var(--ink); }
.article { max-width: 860px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 36px; margin-top: 18px; box-shadow: var(--shadow); }
.article p { margin: 10px 0; }
.article ul { margin: 10px 0 10px 22px; display: grid; gap: 5px; }
.table-wrap { overflow-x: auto; margin: 14px 0; }
.article table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.article th { text-align: left; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 1px; color: var(--ink-soft); border-bottom: 2px solid var(--line); padding: 8px 12px; }
.article td { border-bottom: 1px solid var(--line); padding: 8px 12px; }
.codeblock { margin: 16px 0; border-radius: 10px; overflow: hidden; border: 1px solid #2a3547; }
.code-head { background: var(--dark-2); color: #aeb9cc; display: flex; justify-content: space-between; align-items: center; padding: 7px 14px; font-size: 12.5px; font-family: var(--font-mono); }
.code-tabs { display: flex; gap: 5px; }
.code-tab { border: 0; background: transparent; color: #7e8ba0; font-size: 12px; padding: 4px 10px; border-radius: 6px; font-weight: 600; }
.code-tab.on { background: #313e54; color: #fff; }
.code-body { background: var(--dark); color: #dbe4f0; padding: 16px 18px; overflow-x: auto; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; margin: 0; }

/* ============ interactive video player ============ */
.vplayer { max-width: 980px; background: var(--dark); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid #232e40; }
.vp-stage-wrap { position: relative; min-height: 470px; display: flex; flex-direction: column; }
.vp-stage { flex: 1; display: grid; place-items: center; padding: 26px 26px 74px; }
/* subtitle sits in its own translucent black box so it never fights the scene behind it */
.vp-caption {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 18px;
  max-width: min(860px, calc(100% - 48px)); text-align: center;
  padding: 10px 18px; border-radius: 10px;
  background: rgba(6, 10, 16, .82); backdrop-filter: blur(3px);
  color: #f4f7fb; font-size: 15.5px; font-weight: 500; line-height: 1.5;
}
.vp-caption:empty { display: none; }
.vp-caption-in { animation: capIn .4s ease; }
@keyframes capIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.vp-hand {
  position: absolute; font-size: 34px; z-index: 30; pointer-events: none;
  transition: left .8s cubic-bezier(.4,.1,.2,1), top .8s cubic-bezier(.4,.1,.2,1);
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.5));
  animation: handBob 1.6s ease-in-out infinite;
}
@keyframes handBob { 50% { margin-top: -7px; } }
.vp-interact-hint.vp-hint-done { background: var(--pass); animation: none; }
.vp-interact-hint {
  position: absolute; top: 14px; right: 14px; background: var(--gold); color: #fff; font-size: 12.5px;
  font-weight: 700; padding: 7px 14px; border-radius: 20px; z-index: 25; animation: pulseHint 1.4s infinite;
}
@keyframes pulseHint { 50% { transform: scale(1.06); } }
.vp-poster {
  position: absolute; inset: 0; background: rgba(10, 14, 22, .82); z-index: 40;
  display: grid; place-items: center; align-content: center; gap: 14px;
}
.vp-bigplay {
  width: 76px; height: 76px; border-radius: 50%; border: 0; background: #fff; color: var(--ink);
  font-size: 26px; box-shadow: 0 10px 40px rgba(0,0,0,.5); transition: transform .15s ease;
}
.vp-bigplay:hover { transform: scale(1.08); }
.vp-poster-title { color: #aeb9cc; font-size: 13.5px; font-family: var(--font-mono); }
.vp-controls { display: flex; align-items: center; gap: 12px; background: var(--dark-2); padding: 10px 16px; }
/* maximised: fill the viewport, whether via the Fullscreen API or the CSS fallback */
.vplayer.vp-maxed {
  position: fixed; inset: 0; z-index: 500; max-width: none; border-radius: 0;
  display: flex; flex-direction: column;
}
.vplayer.vp-maxed .vp-stage-wrap { flex: 1; min-height: 0; }
.vplayer:fullscreen { max-width: none; border-radius: 0; display: flex; flex-direction: column; }
.vplayer:fullscreen .vp-stage-wrap { flex: 1; min-height: 0; }
.vplayer:fullscreen .vp-stage, .vplayer.vp-maxed .vp-stage { padding: 32px 32px 90px; }
.vplayer:fullscreen .vp-caption, .vplayer.vp-maxed .vp-caption { font-size: 18px; bottom: 26px; }
.vp-controls button { border: 0; background: transparent; color: #dbe4f0; font-size: 15px; padding: 4px 6px; border-radius: 6px; }
.vp-controls button:hover { background: #313e54; }
.vp-bar { flex: 1; height: 5px; background: #2a3547; border-radius: 4px; overflow: hidden; }
.vp-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--web), var(--mobile)); transition: width .3s ease; }
.vp-scene-label { color: #7e8ba0; font-size: 11.5px; font-family: var(--font-mono); white-space: nowrap; }
.vp-step-label { color: #aeb9cc; font-size: 11.5px; font-family: var(--font-mono); white-space: nowrap; }
.vp-manual {
  background: var(--gold); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 1px;
  border-radius: 20px; padding: 2px 9px; white-space: nowrap;
}
.vp-prev, .vp-next { font-size: 13px; }
.vp-controls button:disabled { opacity: .35; cursor: default; }

/* stage mocks shared */
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.sim-flash { outline: 3px solid var(--gold) !important; outline-offset: 2px; transition: outline .2s; }
.sim-await { animation: awaitPulse 1.1s infinite; cursor: pointer; }
.sim-await:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@keyframes awaitPulse { 50% { box-shadow: 0 0 0 8px rgba(176, 138, 46, .35); } }

.sim-browser { width: min(620px, 100%); background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.sim-browser-bar { display: flex; align-items: center; gap: 6px; background: #e8ebf0; padding: 9px 12px; }
.sim-url { margin-left: 10px; background: #fff; border-radius: 6px; font-size: 12px; color: var(--ink-soft); padding: 4px 12px; flex: 1; font-family: var(--font-mono); }

.sim-terminal, .sim-editor { width: min(660px, 100%); background: var(--dark); border: 1px solid #2a3547; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.sim-term-bar, .sim-ed-bar { display: flex; align-items: center; gap: 6px; background: var(--dark-2); padding: 9px 12px; }
.sim-term-title, .sim-ed-title { margin-left: 10px; color: #7e8ba0; font-size: 12px; font-family: var(--font-mono); }
.sim-term-body { padding: 14px 18px; font-family: var(--font-mono); font-size: 13px; color: #dbe4f0; min-height: 220px; max-height: 300px; overflow-y: auto; }
.sim-term-line { padding: 2px 0; white-space: pre-wrap; animation: termIn .25s ease; }
@keyframes termIn { from { opacity: 0; } }
.term-pass { color: #6fd287; } .term-fail { color: #ff8a80; } .term-dim { color: #7e8ba0; }
.term-hint { color: #ffd54f; padding-left: 10px; }
.sim-ed-body { padding: 12px 0; font-family: var(--font-mono); font-size: 13px; }
.sim-ed-line { display: flex; gap: 14px; padding: 2px 16px; color: #dbe4f0; white-space: pre; }
.sim-ed-num { color: #4a5670; width: 20px; text-align: right; user-select: none; }
.sim-ed-line.active { background: rgba(112, 72, 182, .3); box-shadow: inset 3px 0 0 var(--mobile); }

.sim-diagram { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sim-node {
  background: var(--dark-2); border: 1.5px solid #36435c; color: #dbe4f0; border-radius: 10px;
  padding: 10px 26px; text-align: center; min-width: 300px; transition: all .3s ease;
}
.sim-node b { font-family: var(--font-display); font-size: 15px; display: block; }
.sim-node small { color: #7e8ba0; font-family: var(--font-mono); font-size: 11.5px; }
.sim-node.active { border-color: var(--gold); background: #2b2a1c; transform: scale(1.04); }
.sim-arrow { color: #4a5670; font-size: 17px; }

/* NovaBank web mock */
.mock-web { font-family: var(--font-body); }
.nb-header { display: flex; justify-content: space-between; align-items: center; background: var(--intro); color: #fff; padding: 10px 18px; }
.nb-logo { font-family: var(--font-display); font-weight: 700; }
.nb-env { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 4px; }
.nb-main { padding: 22px 26px; position: relative; }
.nb-title { font-family: var(--font-display); font-size: 18px; margin-bottom: 14px; }
.nb-field { margin-bottom: 12px; }
.nb-field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
.nb-field input, .nb-field select { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px; background: #fafbfc; }
.nb-field input.nb-error { border-color: var(--fail); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.btn.btn-primary { background: var(--intro); color: #fff; border: 0; border-radius: 7px; padding: 10px 20px; font-weight: 600; font-size: 14px; }
.btn.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
#forgot-link { display: inline-block; margin-left: 14px; font-size: 13px; color: var(--intro); text-decoration: underline; }
.nb-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 4px 0 14px; }
.nb-banner { margin-top: 14px; background: var(--web-soft); color: var(--web); border: 1px solid var(--web); border-radius: 7px; padding: 10px 14px; font-weight: 600; }
.nb-banner-err { background: #fdecec; color: var(--fail); border-color: var(--fail); }
.nb-muted { color: var(--ink-soft); }
/* masked without type="password", so password managers leave the mock alone */
.nb-masked { -webkit-text-security: disc; text-security: disc; }
.nb-inspector {
  background: #0f1622; color: #dbe4f0; font-family: var(--font-mono); font-size: 11.5px;
  padding: 9px 14px; border-top: 2px solid var(--gold); min-height: 34px;
}
.nb-insp-idle { color: #7e8ba0; font-style: italic; }
.nb-insp-html { color: #ffd54f; margin-bottom: 4px; word-break: break-all; }
.nb-insp-row { display: flex; gap: 10px; }
.nb-insp-row b { color: #7e8ba0; font-weight: 600; width: 42px; flex-shrink: 0; }
.nb-insp-row code { color: #6fd287; word-break: break-all; }
.insp-picked { outline: 2px solid var(--gold) !important; outline-offset: 1px; }
.nb-spinner { width: 34px; height: 34px; border: 4px solid var(--line); border-top-color: var(--intro); border-radius: 50%; margin: 18px auto; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.nb-list { margin: 14px 0; }
.account-row { display: flex; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 7px; font-size: 13.5px; }
.balance { font-weight: 700; }

/* phone mock */
.mock-phone { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ph-frame {
  width: 270px; background: #000; border-radius: 30px; padding: 10px 9px; box-shadow: 0 24px 70px rgba(0,0,0,.5);
  border: 1px solid #3a4250;
}
.ph-status { display: flex; justify-content: space-between; color: #fff; font-size: 10px; padding: 3px 14px 6px; font-family: var(--font-mono); }
.ph-screen { background: #f4f6f9; border-radius: 18px; height: 396px; overflow: hidden; position: relative; }
.ph-screen.sim-boot { animation: bootFlash .9s ease; }
@keyframes bootFlash { 0% { filter: brightness(.1); } 60% { filter: brightness(.1); } 100% { filter: brightness(1); } }
.ph-navbar { display: flex; justify-content: space-around; color: #8a93a5; padding: 7px 0 3px; font-size: 13px; }
.m-app { padding: 16px 14px; height: 100%; overflow-y: auto; }
.m-logo { text-align: center; color: var(--mobile); font-size: 24px; margin: 18px 0 16px; line-height: 1.15; }
.m-logo b { font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.m-input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 10px; background: #fff; font-size: 13.5px; }
.m-btn { width: 100%; background: var(--mobile); color: #fff; border: 0; border-radius: 9px; padding: 11px; font-weight: 700; font-size: 14px; }
.m-banner { margin-top: 12px; background: var(--web-soft); color: var(--web); border-radius: 8px; padding: 9px 12px; font-size: 13px; font-weight: 600; text-align: center; }
.m-inspector {
  width: min(320px, 100%); background: var(--dark); border: 1px solid #2a3547; color: #dbe4f0;
  font-family: var(--font-mono); font-size: 11px; border-radius: 9px; padding: 9px 12px; margin-top: 12px;
}
.m-insp-head { color: #7e8ba0; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.m-insp-body .nb-insp-row { margin-bottom: 2px; }
.m-insp-body .nb-insp-row b { width: 78px; }
.m-insp-body .nb-insp-row i { color: var(--gold); font-style: normal; }
.m-cards { display: flex; gap: 8px; margin-bottom: 12px; }
.m-card { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; }
.m-card small { color: var(--ink-soft); font-size: 11px; display: block; }
.m-card b { font-size: 14.5px; }
.m-card-wide { margin-top: 8px; border-color: var(--mobile); }
.m-section-label { font-size: 11px; letter-spacing: 1.4px; color: var(--ink-soft); font-family: var(--font-mono); margin: 6px 0; }
.m-txn-list { background: #fff; border: 1px solid var(--line); border-radius: 11px; max-height: 210px; overflow-y: auto; scroll-behavior: smooth; }
.m-txn { display: flex; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid var(--paper); font-size: 12.5px; }
.m-txn-list.sim-swipe { animation: swipeNudge .7s ease; }
@keyframes swipeNudge { 30% { transform: translateY(-8px); } }
.m-contextbar { position: absolute; bottom: 6px; left: 8px; right: 8px; background: var(--dark); color: #6fd287; font-family: var(--font-mono); font-size: 10px; padding: 5px 9px; border-radius: 7px; }
.m-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.m-tab { flex: 1; text-align: center; padding: 8px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; cursor: pointer; }
.m-tab.active { background: var(--mobile); color: #fff; border-color: var(--mobile); }
.m-native-pane .m-muted { color: var(--ink-soft); font-size: 12px; margin-top: 10px; }
.m-webview { border: 2px dashed var(--mobile); border-radius: 10px; padding: 10px; position: relative; margin-top: 4px; }
.m-webview-tag { position: absolute; top: -9px; left: 10px; background: var(--mobile); color: #fff; font-family: var(--font-mono); font-size: 9px; padding: 1px 7px; border-radius: 4px; }
.offer-card { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font-size: 12px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.claim-btn { border: 0; background: var(--mobile-soft); color: var(--mobile); border-radius: 6px; padding: 4px 10px; font-size: 11px; font-weight: 700; }
.m-urlbar { background: #fff; border: 1px solid var(--line); border-radius: 18px; font-size: 11px; color: var(--ink-soft); padding: 6px 13px; margin-bottom: 12px; font-family: var(--font-mono); }
.mw-form h3 { font-family: var(--font-display); font-size: 15px; margin-bottom: 10px; }

/* ============ lab workspace (fake VS Code) ============ */
.lab-top { margin-bottom: 16px; }
.lab-title-row { display: flex; align-items: center; gap: 14px; }
.lab-status { font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; background: var(--intro-soft); color: var(--ink-soft); border-radius: 20px; padding: 4px 12px; }
.lab-status.pass { background: var(--web-soft); color: var(--web); }
.lab-brief { max-width: 900px; color: var(--ink-soft); font-size: 14px; margin-top: 8px; }
.lab-tasks { margin: 10px 0 0 20px; display: grid; gap: 4px; color: var(--ink); font-size: 13.5px; }
/* layout switcher: full-width editor, split, or full-width app */
.lab-view-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.lab-view-switch { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.lab-view-switch button {
  border: 0; background: transparent; border-radius: 7px; padding: 6px 14px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft); position: relative;
}
.lab-view-switch button:hover { color: var(--ink); }
.lab-view-switch button.on { background: var(--ink); color: #fff; }
.lab-view-dot {
  position: absolute; top: 4px; right: 6px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); animation: pulseHint 1.4s infinite;
}
.lab-view-hint { font-size: 12px; color: var(--ink-soft); }

.lab-workspace { display: flex; gap: 16px; align-items: stretch; min-height: 660px; }
.lab-workspace[data-view="editor"] .lab-side { display: none; }
.lab-workspace[data-view="editor"] .vsc { flex: 1 1 100%; }
.lab-workspace[data-view="app"] .vsc { display: none; }
.lab-workspace[data-view="app"] .lab-side { flex: 1 1 100%; }
.lab-workspace[data-view="app"] .lab-app-holder { min-height: 520px; }
.vsc {
  flex: 1.35; min-width: 0; background: var(--dark); border-radius: 12px; overflow: hidden;
  border: 1px solid #2a3547; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.vsc-titlebar { display: flex; align-items: center; gap: 6px; background: #0c111a; padding: 9px 14px; }
.vsc-title { margin-left: 12px; color: #7e8ba0; font-size: 12px; font-family: var(--font-mono); }
.vsc-main { flex: 1; display: flex; min-height: 0; }
.vsc-activitybar { width: 44px; background: #0c111a; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 10px; }
.vsc-activitybar .act { font-size: 17px; padding: 8px; color: #57647c; border-left: 2px solid transparent; cursor: default; width: 100%; text-align: center; }
.vsc-activitybar .act.active { color: #fff; border-left-color: var(--mobile); }
.vsc-explorer { width: 168px; background: #131a26; color: #aeb9cc; font-size: 12.5px; padding: 8px 0; flex-shrink: 0; }
.vsc-exp-head { font-size: 10px; letter-spacing: 1.6px; color: #57647c; padding: 4px 14px 8px; font-family: var(--font-mono); }
.vsc-exp-item { padding: 4px 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vsc-exp-item.dir { padding-left: 22px; }
.vsc-exp-item.file { padding-left: 34px; cursor: default; }
.vsc-exp-item.file.active { background: #22304a; color: #fff; }
.vsc-exp-item.dim { color: #57647c; }
.vsc-editor-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vsc-tabs { display: flex; align-items: center; background: #0c111a; }
.vsc-tab { background: var(--dark); color: #dbe4f0; font-size: 12.5px; padding: 8px 16px; border-top: 2px solid var(--mobile); display: flex; gap: 8px; align-items: center; }
.vsc-tab i { font-style: normal; color: #57647c; }
.vsc-run { margin-left: auto; margin-right: 10px; background: var(--web); color: #fff; border: 0; border-radius: 6px; padding: 6px 16px; font-weight: 700; font-size: 12.5px; }
.vsc-run:hover { background: #268238; }
.vsc-monaco { flex: 1; min-height: 300px; }
.vsc-terminal { height: 190px; border-top: 1px solid #2a3547; display: flex; flex-direction: column; }
.vsc-term-head { font-size: 10.5px; letter-spacing: 1.6px; color: #7e8ba0; padding: 6px 14px; font-family: var(--font-mono); display: flex; justify-content: space-between; background: #131a26; }
.vsc-term-clear { cursor: pointer; }
.vsc-term-body { flex: 1; overflow-y: auto; padding: 8px 14px; font-family: var(--font-mono); font-size: 12.5px; color: #dbe4f0; }
.vsc-statusbar { display: flex; gap: 18px; background: var(--mobile); color: #fff; font-size: 11.5px; padding: 4px 14px; font-family: var(--font-mono); }
.vsc-status-right { margin-left: auto; }

.lab-side { flex: 1; min-width: 340px; display: flex; flex-direction: column; gap: 10px; }
.lab-app-head { display: flex; align-items: center; gap: 8px; }
.lab-app-title { font-weight: 700; font-size: 13.5px; flex: 1; }
.lab-inspect-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; }
.lab-inspect-btn.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.lab-reset-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 11px; font-size: 13px; }
.lab-app-holder { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); overflow: auto; flex: 1; }
.lab-app-holder.mobile { display: grid; place-items: start center; background: linear-gradient(160deg, #1c2432, #2b3446); }
.lab-app-holder.inspecting [data-insp] { cursor: crosshair; }
.lab-app-holder.inspecting [data-insp]:hover { outline: 2px dashed var(--gold); outline-offset: 1px; background-color: rgba(176,138,46,.12); }
.insp-selected { outline: 2.5px solid var(--gold) !important; outline-offset: 1px; }
.lab-inspector { background: var(--dark); border-radius: 12px; border: 1px solid #2a3547; overflow: hidden; }
.lab-insp-head { background: var(--dark-2); color: #dbe4f0; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 1px; padding: 8px 14px; }
.lab-insp-body { padding: 10px 14px; color: #aeb9cc; font-size: 12.5px; max-height: 200px; overflow-y: auto; }
.insp-table { width: 100%; border-collapse: collapse; }
.insp-table td { padding: 4px 6px; border-bottom: 1px solid #232e40; vertical-align: top; }
.insp-k { color: #7e8ba0; font-family: var(--font-mono); font-size: 11px; white-space: nowrap; }
.insp-v code { color: #ffd54f; font-family: var(--font-mono); font-size: 11.5px; word-break: break-all; }
.insp-copy { border: 1px solid #36435c; background: transparent; color: #aeb9cc; font-size: 10.5px; border-radius: 5px; padding: 2px 8px; }
.insp-copy:hover { background: #313e54; }

/* ============ quiz ============ */
.quiz { max-width: 820px; display: flex; flex-direction: column; gap: 16px; }
.quiz-q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); }
.quiz-qhead { display: flex; gap: 10px; align-items: baseline; margin-bottom: 10px; }
.quiz-qhead h3 { font-family: var(--font-body); font-weight: 600; font-size: 15.5px; line-height: 1.45; }
.quiz-num { background: var(--intro); color: #fff; border-radius: 6px; font-family: var(--font-mono); font-size: 12px; padding: 1px 8px; flex-shrink: 0; }
.quiz-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; margin-top: 4px; }
.quiz-opt:hover { background: var(--paper); }
.quiz-opt.correct { background: var(--web-soft); outline: 1.5px solid var(--web); }
.quiz-opt.wrong { background: #fdecec; outline: 1.5px solid var(--fail); }
.quiz-result { max-width: 820px; margin-top: 20px; border-radius: var(--radius); padding: 20px 24px; font-size: 15px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.quiz-result.pass { background: var(--web-soft); border: 1.5px solid var(--web); }
.quiz-result.fail { background: #fdecec; border: 1.5px solid var(--fail); }

/* ============ profile & certificate ============ */
.profile-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.card form { display: flex; flex-direction: column; gap: 13px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge.big { flex-direction: column; text-align: center; padding: 14px 10px; gap: 4px; }
.badge.big .badge-icon { font-size: 28px; }
.badge.big small { font-size: 11px; }
.badge.big em { font-size: 10px; color: var(--ink-soft); font-style: normal; }
.cert-wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cert { background: #fffdf6; border-radius: 6px; padding: 14px; box-shadow: var(--shadow); width: min(820px, 100%); }
.cert-border { border: 3px double var(--gold); padding: 44px 50px; text-align: center; }
.cert-lab { font-family: var(--font-mono); font-size: 11px; letter-spacing: 3px; color: var(--gold); }
.cert h1 { font-size: 34px; margin: 14px 0 20px; }
.cert-line { color: var(--ink-soft); max-width: 560px; margin: 6px auto; }
.cert-name { font-family: var(--font-display); font-size: 34px; margin: 12px 0; border-bottom: 2px solid var(--gold); display: inline-block; padding: 0 30px 6px; }
.cert-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 34px; color: var(--ink-soft); font-size: 13px; }
.cert-seal { font-size: 34px; }
@media print {
  body * { visibility: hidden; }
  .cert, .cert * { visibility: visible; }
  .cert { position: absolute; left: 0; top: 0; box-shadow: none; }
}

/* ============ extra phases ============ */
:root { --pw: #2d7d6f; --pw-soft: #ddf0ec; }
.nav-section.phase-playwright.active, .nav-section.phase-playwright:not(.locked):hover { border-left-color: var(--pw); }
.pipe-node.phase-playwright .pipe-dot { border-color: var(--pw); }
.pipe-node.phase-playwright .pipe-rail { background: linear-gradient(var(--pw), var(--line)); }
.pipe-node.phase-playwright .pipe-phase { color: var(--pw); }
.course-head.phase-playwright { background: linear-gradient(120deg, #1b4f47, var(--pw)); }
.admin-sec > b.phase-playwright { color: var(--pw); }
.admin-banner {
  background: var(--intro); color: #fff; border-radius: var(--radius); padding: 11px 18px;
  font-size: 13.5px; margin-bottom: 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
.admin-banner a { margin-left: auto; color: #b9c9e6; font-weight: 600; text-decoration: underline; }
.admin-banner a:hover { color: #fff; }
.nav-opt {
  margin-left: auto; font-size: 10px; letter-spacing: .6px; font-weight: 700;
  color: var(--gold); background: var(--gold-soft); padding: 1px 7px; border-radius: 20px;
}
.pipe-optional {
  background: var(--gold-soft); color: var(--gold); border-radius: 10px;
  padding: 1px 8px; font-size: 9.5px; letter-spacing: 1.2px; margin-left: 6px; font-weight: 800;
}
.code-tab:disabled { opacity: 1; cursor: default; }

:root { --bdd: #0f7b6c; --bdd-soft: #dff2ee; --collab: #1f6feb; --collab-soft: #e3edfd; --practice: #b06a1f; --practice-soft: #f8eddd; }
.nav-section.phase-bdd.active, .nav-section.phase-bdd:not(.locked):hover { border-left-color: var(--bdd); }
.nav-section.phase-collab.active, .nav-section.phase-collab:not(.locked):hover { border-left-color: var(--collab); }
.nav-section.phase-practice.active, .nav-section.phase-practice:not(.locked):hover { border-left-color: var(--practice); }
.pipe-node.phase-bdd .pipe-dot { border-color: var(--bdd); }
.pipe-node.phase-collab .pipe-dot { border-color: var(--collab); }
.pipe-node.phase-practice .pipe-dot { border-color: var(--practice); }
.pipe-node.phase-bdd .pipe-rail { background: linear-gradient(var(--bdd), var(--line)); }
.pipe-node.phase-collab .pipe-rail { background: linear-gradient(var(--collab), var(--line)); }
.pipe-node.phase-practice .pipe-rail { background: linear-gradient(var(--practice), var(--line)); }
.pipe-node.phase-bdd .pipe-phase { color: var(--bdd); }
.pipe-node.phase-collab .pipe-phase { color: var(--collab); }
.pipe-node.phase-practice .pipe-phase { color: var(--practice); }
.course-head.phase-bdd { background: linear-gradient(120deg, #085147, var(--bdd)); }
.course-head.phase-collab { background: linear-gradient(120deg, #12467f, var(--collab)); }
.course-head.phase-practice { background: linear-gradient(120deg, #7d4a14, var(--practice)); }
.admin-sec > b.phase-bdd { color: var(--bdd); }
.admin-sec > b.phase-collab { color: var(--collab); }
.admin-sec > b.phase-practice { color: var(--practice); }
.sim-gitapp { width: min(680px, 100%); border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45); background: var(--surface); }
.sim-gitapp .sg, .sim-gitapp .bb { font-size: 12px; }
.sim-gitapp .sg-main { min-height: 300px; }

/* ============ git lab workspace ============ */
.gitlab { display: flex; gap: 16px; align-items: stretch; min-height: 620px; }
.gitlab[data-view="editor"] .git-side { display: none; }
.gitlab[data-view="editor"] .git-console { flex: 1 1 100%; }
.gitlab[data-view="app"] .git-console { display: none; }
.gitlab[data-view="app"] .git-side { flex: 1 1 100%; min-width: 0; }
.git-console { flex: 1; min-width: 0; background: var(--dark); border: 1px solid #2a3547; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.gc-head { background: #0c111a; color: #7e8ba0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.4px; padding: 8px 14px; display: flex; justify-content: space-between; }
.gc-clear { cursor: pointer; }
.gc-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 16px; font-family: var(--font-mono); font-size: 12.5px; color: #dbe4f0; line-height: 1.55; }
.gc-line { white-space: pre-wrap; word-break: break-word; }
.gc-cmd { color: #fff; font-weight: 600; }
.gc-pass { color: #6fd287; } .gc-fail { color: #ff8a80; } .gc-dim { color: #7e8ba0; }
.gc-hint { color: #ffd54f; } .gc-gui { color: #b79aec; font-style: italic; }
.gc-inputline { display: flex; align-items: center; gap: 8px; border-top: 1px solid #2a3547; padding: 9px 14px; background: #131a26; overflow: hidden; }
.gc-prompt { color: #6fd287; font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gc-input { flex: 1 1 120px; min-width: 0; background: transparent; border: 0; outline: none; color: #fff; font-family: var(--font-mono); font-size: 12.5px; }
.git-side { flex: 1.15; min-width: 380px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.git-tabs { display: flex; background: var(--paper); border-bottom: 1px solid var(--line); }
.git-tabs button { flex: 1; border: 0; background: transparent; padding: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid transparent; }
.git-tabs button.on { background: var(--surface); color: var(--ink); border-bottom-color: var(--collab); }
.git-pane { flex: 1; overflow: auto; }

/* Sourcetree-ish */
.sg { display: flex; flex-direction: column; height: 100%; }
.sg-toolbar { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--paper); flex-wrap: wrap; }
.sg-toolbar button { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 6px 11px; font-size: 12px; font-weight: 600; }
.sg-toolbar button:hover { background: var(--collab-soft); border-color: var(--collab); }
.sg-toolbar button i { font-style: normal; background: var(--collab); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 10.5px; margin-left: 3px; }
.sg-main { flex: 1; display: flex; min-height: 0; }
.sg-sidebar { width: 168px; border-right: 1px solid var(--line); padding: 8px 0; font-size: 12px; flex-shrink: 0; background: #fbfcfd; }
.sg-sec { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 1.4px; color: var(--ink-soft); padding: 8px 12px 4px; }
.sg-branch { padding: 4px 12px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-branch:hover { background: var(--paper); }
.sg-branch.current { font-weight: 700; color: var(--collab); }
.sg-branch.remote { color: var(--ink-soft); }
.sg-empty { color: var(--ink-soft); font-size: 11.5px; padding: 4px 12px; font-style: italic; }
.sg-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sg-subtabs { display: flex; border-bottom: 1px solid var(--line); }
.sg-subtabs button { border: 0; background: transparent; padding: 8px 14px; font-size: 12px; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid transparent; }
.sg-subtabs button.on { color: var(--ink); border-bottom-color: var(--collab); }
.sg-status { padding: 10px 12px; overflow-y: auto; }
.sg-group { margin-bottom: 12px; }
.sg-group-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 1.3px; color: var(--ink-soft); padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.sg-group-head.conflict { color: var(--fail); }
.sg-all { border: 0; background: var(--paper); border-radius: 5px; font-size: 10.5px; padding: 2px 8px; font-weight: 700; color: var(--ink-soft); }
.sg-file { display: flex; align-items: center; gap: 8px; padding: 5px 4px; font-size: 12px; border-radius: 6px; cursor: pointer; }
.sg-file:hover { background: var(--paper); }
.sg-file.conflict { background: #fdecec; }
.sg-kind { width: 17px; height: 17px; border-radius: 4px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; background: var(--ink-soft); flex-shrink: 0; }
.sg-kind.sg-new-file { background: var(--pass); } .sg-kind.sg-modified { background: #d9a406; }
.sg-kind.sg-deleted { background: var(--fail); } .sg-kind.sg-conflict { background: var(--fail); }
.sg-path { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 11.5px; }
.sg-move, .sg-edit { border: 1px solid var(--line); background: var(--surface); border-radius: 5px; font-size: 10.5px; padding: 2px 9px; font-weight: 600; }
.sg-move:hover, .sg-edit:hover { background: var(--collab-soft); border-color: var(--collab); color: var(--collab); }
.sg-commitbox { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.sg-commitbox textarea { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; font-family: var(--font-body); font-size: 12.5px; resize: vertical; }
#sg-commit-btn { align-self: flex-start; background: var(--collab); color: #fff; border: 0; border-radius: 7px; padding: 7px 16px; font-weight: 700; font-size: 12.5px; }
.sg-diff { margin-top: 10px; background: var(--dark); border-radius: 8px; padding: 9px 12px; font-family: var(--font-mono); font-size: 11px; color: #aeb9cc; max-height: 150px; overflow: auto; }
.sg-diff em { color: #7e8ba0; }
.d-add { color: #6fd287; } .d-del { color: #ff8a80; } .d-ctx { color: #7e8ba0; }
.d-file { color: #fff; font-weight: 600; margin-bottom: 4px; }
.sg-graph { padding: 12px 14px; overflow-y: auto; }
.sg-commit { display: flex; gap: 12px; }
.sg-rail { display: flex; flex-direction: column; align-items: center; width: 14px; }
.sg-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--collab); flex-shrink: 0; margin-top: 4px; }
.sg-dot.merge { background: var(--gold); }
.sg-line { flex: 1; width: 2px; background: var(--line); }
.sg-commit-body { padding-bottom: 14px; min-width: 0; }
.sg-commit-msg { font-size: 12.5px; font-weight: 600; }
.sg-commit-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); }
.sg-tag { background: var(--collab-soft); color: var(--collab); border-radius: 10px; font-size: 10px; padding: 1px 7px; margin-left: 5px; font-weight: 700; }
.sg-tag.head { background: var(--collab); color: #fff; }
.sg-tag.remote { background: var(--paper); color: var(--ink-soft); }

/* Bitbucket-ish */
.bb { display: flex; flex-direction: column; height: 100%; }
.bb-head { display: flex; align-items: center; gap: 12px; background: #0f2b5b; color: #fff; padding: 9px 14px; font-size: 12.5px; }
.bb-logo { font-weight: 700; }
.bb-repo { color: #b9c9e6; font-family: var(--font-mono); font-size: 11.5px; }
.bb-tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--paper); }
.bb-tabs button { border: 0; background: transparent; padding: 9px 14px; font-size: 12px; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid transparent; }
.bb-tabs button.on { color: var(--ink); border-bottom-color: var(--collab); background: var(--surface); }
.bb-tabs i { font-style: normal; background: var(--collab); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 10px; margin-left: 4px; }
.bb-body { flex: 1; overflow-y: auto; padding: 12px 14px; }
.bb-actions { margin-bottom: 10px; }
.bb-primary { background: var(--collab); color: #fff; border: 0; border-radius: 7px; padding: 7px 15px; font-weight: 700; font-size: 12.5px; }
.bb-primary:disabled { opacity: .45; }
.bb-form { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 12px; display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; }
.bb-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.bb-form input, .bb-form select, .bb-form textarea { border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; font-size: 12.5px; font-family: var(--font-body); background: #fff; }
.bb-row { display: flex; gap: 10px; }
.bb-row label { flex: 1; }
.bb-list { display: flex; flex-direction: column; gap: 8px; }
.bb-pr { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; cursor: pointer; }
.bb-pr:hover { border-color: var(--collab); background: var(--collab-soft); }
.bb-pr-main { flex: 1; min-width: 0; }
.bb-pr-main b { font-size: 12.5px; display: block; }
.bb-pr-main small { color: var(--ink-soft); font-size: 11px; font-family: var(--font-mono); }
.bb-status { font-size: 10px; font-weight: 800; letter-spacing: .8px; border-radius: 4px; padding: 2px 8px; background: var(--collab-soft); color: var(--collab); }
.bb-status.merged { background: var(--mobile-soft); color: var(--mobile); }
.bb-status.declined { background: #fdecec; color: var(--fail); }
.bb-approv { font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.bb-empty { color: var(--ink-soft); font-style: italic; font-size: 12.5px; }
.bb-link { border: 0; background: transparent; color: var(--collab); font-size: 12px; font-weight: 600; padding: 0 0 8px; }
.bb-pr-head { display: flex; align-items: center; gap: 10px; }
.bb-pr-head h3 { font-family: var(--font-display); font-size: 15px; }
.bb-pr-sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); margin-bottom: 8px; }
.bb-desc { font-size: 12.5px; background: var(--paper); border-radius: 7px; padding: 9px 11px; margin-bottom: 9px; }
.bb-pipeline { border-radius: 7px; padding: 8px 12px; font-size: 12px; font-weight: 600; margin-bottom: 9px; }
.bb-pipeline.running { background: var(--gold-soft); color: var(--gold); }
.bb-pipeline.passed { background: var(--web-soft); color: var(--web); }
.bb-pipeline.failed { background: #fdecec; color: var(--fail); }
.bb-commits { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); margin-bottom: 10px; display: grid; gap: 3px; }
.bb-commits code { color: var(--collab); }
.bb-diff { background: var(--dark); border-radius: 8px; padding: 10px 12px; font-family: var(--font-mono); font-size: 11px; color: #aeb9cc; margin-bottom: 10px; max-height: 190px; overflow: auto; }
.bb-diff-head { color: #fff; font-weight: 600; margin-bottom: 6px; }
.bb-diff-file { margin-bottom: 8px; }
.bb-diff-file b { color: #ffd54f; display: block; margin-bottom: 3px; }
.bb-review { border-top: 1px solid var(--line); padding-top: 10px; }
.bb-comment { background: var(--paper); border-radius: 7px; padding: 7px 10px; font-size: 12px; margin-bottom: 6px; }
.bb-comment b { color: var(--collab); }
.bb-review textarea { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; font-size: 12.5px; font-family: var(--font-body); resize: vertical; }
.bb-review-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.bb-review-actions button, .bb-review-actions select { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 7px 13px; font-size: 12px; font-weight: 600; }
.bb-review-actions .bb-primary { background: var(--collab); border-color: var(--collab); color: #fff; }
.bb-review-actions .bb-primary:disabled { opacity: .45; }
#bb-approve-btn:not(:disabled):hover { background: var(--web-soft); border-color: var(--web); color: var(--web); }

/* files pane */
.gf { display: flex; height: 100%; min-height: 320px; }
.gf-list { width: 190px; border-right: 1px solid var(--line); padding: 6px 0; flex-shrink: 0; background: #fbfcfd; overflow-y: auto; }
.gf-item { padding: 5px 12px; font-size: 11.5px; font-family: var(--font-mono); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gf-item:hover { background: var(--paper); }
.gf-item.on { background: var(--collab-soft); color: var(--collab); font-weight: 700; }
.gf-item.conflict { color: var(--fail); }
.gf-new { margin: 8px 12px; border: 1px dashed var(--line); background: transparent; border-radius: 6px; font-size: 11px; padding: 5px 8px; width: calc(100% - 24px); }
.gf-editor { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.gf-ed-head { background: var(--paper); border-bottom: 1px solid var(--line); padding: 7px 12px; font-family: var(--font-mono); font-size: 11.5px; display: flex; gap: 10px; align-items: center; }
.gf-conflict-tag { background: var(--fail); color: #fff; border-radius: 4px; font-size: 9.5px; padding: 2px 7px; font-weight: 700; }
.gf-ed-area { flex: 1; border: 0; outline: none; padding: 12px 14px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; resize: none; background: var(--dark); color: #dbe4f0; min-height: 240px; }
.gf-ed-actions { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line); }
.gf-save { background: var(--collab); color: #fff; border: 0; border-radius: 7px; padding: 7px 16px; font-weight: 700; font-size: 12.5px; }
.gf-hint { font-size: 11.5px; color: var(--ink-soft); }
.gf-empty { display: grid; place-items: center; height: 100%; color: var(--ink-soft); font-style: italic; font-size: 12.5px; }

/* objectives */
.git-checks { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; box-shadow: var(--shadow); }
.git-checks-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.git-task-list { list-style: none; display: grid; gap: 7px; }
.git-task-list li { font-size: 13.5px; display: grid; grid-template-columns: 18px 1fr; gap: 8px; color: var(--ink-soft); }
.git-task-list li span { color: var(--line); font-weight: 700; }
.git-task-list li.done { color: var(--ink); }
.git-task-list li.done span { color: var(--pass); }
.git-task-list li em { grid-column: 2; font-size: 12px; color: var(--ink-soft); font-style: normal; opacity: .85; }

@media (max-width: 1100px) { .gitlab { flex-direction: column; } .git-side { min-width: 0; } }

/* ============ admin ============ */
.admin-card { padding: 0; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1px; color: var(--ink-soft); border-bottom: 2px solid var(--line); padding: 12px 14px; white-space: nowrap; }
.admin-table td { border-bottom: 1px solid var(--line); padding: 10px 14px; vertical-align: top; }
.admin-table small { color: var(--ink-soft); font-size: 11.5px; }
.pipe-bar.mini { height: 4px; width: 90px; margin-top: 5px; }
.tag { display: inline-block; background: var(--paper); color: var(--ink-soft); border-radius: 12px; font-size: 11px; padding: 2px 9px; font-weight: 600; margin: 2px 3px 2px 0; }
.tag.pass { background: var(--web-soft); color: var(--web); }
.tag.warn { background: var(--gold-soft); color: var(--gold); }
.admin-filter { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.admin-filter input { accent-color: var(--web); cursor: pointer; }
.admin-detail { margin-top: 20px; }
.admin-sec { margin-top: 14px; }
.admin-sec > b { display: block; margin-bottom: 6px; font-family: var(--font-display); }
.admin-sec > b.phase-web { color: var(--web); }
.admin-sec > b.phase-mobile { color: var(--mobile); }
.admin-sec > b.phase-capstone { color: var(--gold); }
.admin-sec-rows { display: flex; flex-wrap: wrap; }

/* ============ responsive ============ */
@media (max-width: 1100px) {
  .lab-workspace { flex-direction: column; }
  .lab-side { min-width: 0; }
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .nav { flex-direction: row; overflow-x: auto; }
  .sidebar-foot { border-top: 0; margin-left: auto; flex-direction: row; align-items: center; }
  .content { padding: 22px 18px 60px; }
  .auth-wrap { flex-direction: column; }
  .auth-hero { padding: 40px 24px; }
  .auth-card { max-width: none; }
}
/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============ NovaBank portal (the page locator training is taught against) ============ */
.nb-portal { padding: 18px 22px; display: grid; gap: 18px; }
.section-title { font-family: var(--font-display); font-size: 16px; margin-bottom: 10px; }
.account-grid, .card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.account-card, .portal .card {
  border: 1px solid var(--line); border-radius: 9px; padding: 12px; background: #fafbfc;
}
.account-name, .card-name { font-family: var(--font-display); font-size: 14px; }
.account-mask, .card-mask { font-size: 11.5px; color: var(--ink-soft); font-family: var(--font-mono); }
.portal .balance { font-weight: 700; margin: 6px 0 9px; }
.btn.btn-secondary {
  background: #fff; border: 1px solid var(--intro); color: var(--intro);
  border-radius: 6px; padding: 5px 12px; font-size: 12.5px; font-weight: 600;
}
.nb-nav, .topnav { display: flex; gap: 14px; font-size: 13px; }
.nav-link { opacity: .75; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.nav-link.active { opacity: 1; border-bottom-color: #fff; }
.nb-search { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
.portal input[type="search"] {
  width: 260px; max-width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; background: #fafbfc;
}
.nb-table, .data-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.nb-table th, .data-table th {
  text-align: left; font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px;
  color: var(--ink-soft); border-bottom: 2px solid var(--line); padding: 7px 8px;
}
.nb-table td, .data-table td { border-bottom: 1px solid var(--line); padding: 7px 8px; }
.tx-amount, .col-amt { font-family: var(--font-mono); }
.pill { border-radius: 20px; font-size: 10.5px; font-weight: 700; padding: 2px 9px; }
.pill-ok { background: var(--web-soft); color: var(--web); }
.pill-pending { background: var(--gold-soft); color: var(--gold); }
.pill-fail { background: #fdecec; color: var(--fail); }
.btn.btn-link, .link-btn { background: none; border: 0; color: var(--intro); font-size: 12.5px; text-decoration: underline; }
.nb-empty { color: var(--ink-soft); font-size: 13px; margin-top: 10px; }
.nb-foot { border-top: 1px solid var(--line); padding: 8px 22px; color: var(--ink-soft); }

/* ============ simulated Chrome DevTools ============ */
.dt { display: flex; flex-direction: column; min-width: 0; }
.dt-viewport { position: relative; background: #eef1f5; padding: 14px; display: flex; justify-content: center; }
.dt-viewport .sim-browser { width: 100%; box-shadow: 0 6px 22px rgba(0,0,0,.16); }
.dt-page { background: #fff; }
.dt-page.dt-picking, .dt-page.dt-picking * { cursor: crosshair !important; }
.dt-hl { outline: 2px solid #48a0f8 !important; outline-offset: -1px; background: rgba(72,160,248,.12) !important; }
.dt-hl-sel { outline: 2px solid #48a0f8 !important; outline-offset: -1px; }
.dt-found { outline: 2px dashed var(--gold) !important; outline-offset: -1px; }
.dt-found-on { outline: 3px solid var(--gold) !important; background: rgba(176,138,46,.14) !important; }
.dt-overlay { position: absolute; top: 6px; left: 14px; pointer-events: none; }
.dt-overlay-tag {
  background: #48a0f8; color: #fff; font-family: var(--font-mono); font-size: 11px;
  padding: 2px 8px; border-radius: 4px;
}
.dt-panel {
  background: #202124; color: #e8eaed; border-top: 1px solid #3c4043;
  display: flex; flex-direction: column; min-height: 0; flex: 1;
}
.dt-tabs { display: flex; align-items: center; gap: 2px; background: #292a2d; padding: 4px 6px; border-bottom: 1px solid #3c4043; }
.dt-tabs button { background: none; border: 0; color: #9aa0a6; font-size: 12px; padding: 5px 11px; border-radius: 4px; }
.dt-tabs .dt-tab.on { background: #35363a; color: #fff; }
.dt-pick.on { background: #48a0f8; color: #fff; }
.dt-find { display: flex; align-items: center; gap: 6px; background: #292a2d; padding: 5px 8px; border-bottom: 1px solid #3c4043; }
.dt-find-input {
  flex: 1; background: #202124; border: 1px solid #5f6368; border-radius: 4px; color: #e8eaed;
  font-family: var(--font-mono); font-size: 12px; padding: 4px 8px;
}
.dt-find-count { font-family: var(--font-mono); font-size: 11px; color: #9aa0a6; white-space: nowrap; }
.dt-find-count.dt-find-err { color: #f28b82; }
.dt-find button { background: none; border: 0; color: #9aa0a6; font-size: 12px; padding: 2px 6px; }
.dt-body { flex: 1; min-height: 0; display: flex; }
.dt-pane { flex: 1; min-width: 0; overflow: auto; }
.dt-tree { font-family: var(--font-mono); font-size: 11.5px; line-height: 1.75; padding: 6px 0 14px; }
.dt-row { white-space: nowrap; cursor: default; padding-right: 10px; }
.dt-row:hover { background: #2f3134; }
.dt-row.dt-sel { background: #073763; }
.dt-row.dt-match { background: rgba(176,138,46,.22); }
.dt-row.dt-match-on { background: rgba(176,138,46,.45); }
.dt-row.dt-static { color: #9aa0a6; }
.dt-twisty { display: inline-block; width: 14px; color: #9aa0a6; cursor: pointer; }
.dt-twisty.dt-none { cursor: default; }
.dt-b { color: #9aa0a6; }
.dt-tag { color: #8ab4f8; font-weight: 400; }
.dt-attr { color: #9ee2a5; font-style: normal; }
.dt-val { color: #f28b82; text-decoration: none; }
.dt-text { color: #e8eaed; }
.dt-ellipsis { color: #9aa0a6; padding: 0 4px; }
.dt-doctype { color: #9aa0a6; }
.dt-dollar { color: #9aa0a6; font-style: normal; padding-left: 8px; }
.dt-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px; background: #292a2d;
  border-top: 1px solid #3c4043; padding: 4px 8px; font-family: var(--font-mono); font-size: 11px; color: #9aa0a6;
}
.dt-crumb { cursor: pointer; padding: 1px 5px; border-radius: 3px; }
.dt-crumb:hover { background: #3c4043; color: #fff; }
.dt-crumb.on { background: #3c4043; color: #fff; }
.dt-crumb-static { cursor: default; opacity: .6; }
.dt-crumb-sep { opacity: .5; }
.dt-selected { border-top: 1px solid #3c4043; background: #202124; padding: 8px 10px; max-height: 232px; overflow: auto; }
.dt-sel-head { font-size: 11.5px; color: #9aa0a6; margin-bottom: 6px; }
.dt-sel-head code { color: #8ab4f8; font-family: var(--font-mono); }
.dt-sel-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.dt-sel-table td { border-top: 1px solid #3c4043; padding: 5px 6px; vertical-align: top; }
.dt-sel-kind { color: #9aa0a6; font-family: var(--font-mono); text-transform: uppercase; font-size: 10px; }
.dt-sel-value { color: #9ee2a5; font-family: var(--font-mono); display: block; word-break: break-all; }
.dt-sel-table small { color: #9aa0a6; display: block; line-height: 1.4; margin-top: 2px; }
.dt-sel-count { font-family: var(--font-mono); white-space: nowrap; }
.dt-sel-count.one { color: #9ee2a5; }
.dt-sel-count.many { color: #fdd663; }
.dt-q-poor .dt-sel-value { color: #f28b82; }
.dt-try { background: #35363a; border: 0; color: #e8eaed; font-size: 11px; border-radius: 4px; padding: 3px 8px; }
.dt-console { display: flex; flex-direction: column; font-family: var(--font-mono); font-size: 12px; }
.dt-con-out { flex: 1; overflow: auto; padding: 8px 10px; min-height: 120px; }
.dt-con-hint { color: #9aa0a6; }
.dt-con-hint code { color: #9ee2a5; }
.dt-con-line { padding: 2px 0; border-bottom: 1px solid #292a2d; word-break: break-word; }
.dt-con-echo { color: #9aa0a6; }
.dt-con-err { color: #f28b82; }
.dt-con-count { color: #9aa0a6; }
.dt-con-node { color: #8ab4f8; cursor: pointer; }
.dt-con-node:hover { text-decoration: underline; }
.dt-con-null { color: #9aa0a6; }
.dt-con-in { display: flex; align-items: center; gap: 6px; border-top: 1px solid #3c4043; padding: 5px 10px; color: #8ab4f8; }
.dt-con-input { flex: 1; background: none; border: 0; color: #e8eaed; font-family: var(--font-mono); font-size: 12px; outline: none; }

/* the panel inside a video stage */
.stage-devtools .sim-devtools {
  width: min(940px, 100%); background: #202124; border-radius: 10px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.45); display: flex; flex-direction: column;
}
.stage-devtools .dt-viewport { padding: 10px; }
.stage-devtools .dt-tree { max-height: 210px; }
.stage-devtools .dt-body { max-height: 240px; }

/* ============ locator labs ============ */
.loc-ws { align-items: stretch; }
.loc-ws[data-view="editor"] .loc-panel { display: none; }
.loc-ws[data-view="editor"] .loc-side { flex: 1 1 100%; }
.loc-ws[data-view="app"] .loc-side { display: none; }
.loc-ws[data-view="app"] .loc-panel { flex: 1 1 100%; }
.loc-panel {
  flex: 1.25; min-width: 0; border-radius: 12px; overflow: hidden; border: 1px solid #3c4043;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.loc-panel .dt-body { min-height: 260px; }
.loc-side {
  flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.loc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.loc-variant-switch { display: flex; gap: 4px; }
.loc-variant-switch button {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft);
  border-radius: 20px; font-size: 11.5px; padding: 3px 10px;
}
.loc-variant-switch button.on { background: var(--intro); border-color: var(--intro); color: #fff; }
.loc-list { flex: 1; overflow: auto; padding: 10px 14px; display: grid; gap: 10px; align-content: start; }
.loc-card { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: #fafbfc; }
.loc-card.passed { border-color: var(--pass); background: var(--web-soft); }
.loc-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.loc-num {
  width: 20px; height: 20px; border-radius: 50%; background: var(--intro); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.loc-prompt { flex: 1; min-width: 180px; font-size: 13.5px; }
.loc-chip { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 1px; border-radius: 4px; padding: 2px 6px; }
.loc-chip-css { background: var(--web-soft); color: var(--web); }
.loc-chip-xpath { background: var(--mobile-soft); color: var(--mobile); }
.loc-chip-any { background: var(--intro-soft); color: var(--intro); }
.loc-points { font-size: 11px; color: var(--ink-soft); font-family: var(--font-mono); }
.loc-note { font-size: 12px; color: var(--ink-soft); margin: 4px 0 0; }
.loc-input-row { display: flex; gap: 6px; margin-top: 8px; }
.loc-input {
  flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 12.5px;
  border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; background: #fff;
}
.loc-input:focus { outline: 2px solid var(--intro); outline-offset: -1px; }
.loc-test { border: 1px solid var(--intro); background: #fff; color: var(--intro); border-radius: 7px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; }
.loc-feedback { font-size: 12px; margin-top: 6px; min-height: 0; }
.loc-feedback.ok { color: var(--pass); }
.loc-feedback.bad { color: var(--fail); }
.loc-actions { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.loc-reset { border: 1px solid var(--line); background: var(--paper); border-radius: 7px; padding: 6px 12px; }
.loc-out {
  background: var(--dark); color: #dbe4f0; font-family: var(--font-mono); font-size: 12px;
  padding: 10px 14px; max-height: 190px; overflow: auto; border-radius: 0 0 11px 11px;
}
.loc-out-line { padding: 1px 0; white-space: pre-wrap; }
.loc-out-line.ok { color: #6fd287; }
.loc-out-line.bad { color: #ff8a80; }
.loc-out-line.dim { color: #7e8ba0; }
.loc-out-line.hint { color: #ffd54f; }
.loc-scratch { display: none; }

@media (max-width: 1100px) {
  .loc-ws { flex-direction: column; }
  .account-grid, .card-grid { grid-template-columns: 1fr; }
}

/* Sourcetree / Bitbucket controls that actually do something */
.sg-cmd { margin-left: auto; padding-right: 10px; font-family: var(--font-mono); font-size: 10.5px; color: #7e8ba0; }
.sg-cmd-flash { color: var(--gold); }
.sg-dialog { background: #131a26; border: 1px solid #2a3547; border-radius: 8px; padding: 8px; margin: 8px 6px; }
.sg-dialog label { display: block; font-size: 10px; letter-spacing: 1px; color: #57647c; margin-bottom: 4px; }
.sg-dialog input { width: 100%; background: #0c111a; border: 1px solid #2a3547; border-radius: 6px; color: #dbe4f0; font-family: var(--font-mono); font-size: 11px; padding: 5px 7px; }
.sg-dialog button { margin-top: 6px; width: 100%; background: var(--intro); color: #fff; border: 0; border-radius: 6px; padding: 5px; font-size: 11.5px; }
.bb-pr.open-pr { outline: 2px solid var(--intro); outline-offset: -2px; }
.nb-note { margin-top: 10px; background: var(--intro-soft); color: var(--intro); border-radius: 7px; padding: 8px 11px; font-size: 12.5px; }
