:root {
  --ink: #ffffff;
  --deep: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #f2f4f7;
  --line: #e7e9ee;
  --text: #0b0d12;
  --muted: #5a6270;
  --faint: #6b7280;
  --teal: #0aa898;
  --blue: #1a7cff;
  --grad: linear-gradient(90deg, #4fe0c4 0%, #5aa2ff 100%);
  --good: #12a150;
  --warn: #c97a06;
  --bad: #e11d48;
  --r-lg: 14px;
  --r: 10px;
  --r-sm: 8px;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--text); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; margin: 0; line-height: 1.12; }
h1 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }
h2 { font-size: 21px; font-weight: 750; }
h3 { font-size: 16px; font-weight: 700; font-style: normal; }
.lede { color: var(--muted); margin: 8px 0 0; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--deep) 235px, var(--line) 235px 236px, transparent 236px); }
.shell > .rail { align-self: start; }
.rail { position: sticky; top: 0; height: 100vh; padding: 22px 14px; border-right: 1px solid var(--line); background: var(--deep); display: flex; flex-direction: column; gap: 4px; }
.rail .logo { padding: 2px 8px 18px; }
.rail .logo img { width: 170px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--text); background: var(--panel-2); box-shadow: inset 3px 0 0 var(--teal); }
.nav svg { width: 19px; height: 19px; flex: none; }
.nav .sep { height: 1px; background: var(--line); margin: 10px 8px; }
.rail .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-top: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.rail .me .who { font-size: 13px; line-height: 1.3; min-width: 0; }
.rail .me .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail .me a { color: var(--muted); font-size: 12px; text-decoration: none; }
.main { min-width: 0; padding: 34px clamp(16px, 4vw, 48px) 80px; }
.page { max-width: 1060px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.topbar, .tabbar { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .rail { display: none; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; padding: 12px 16px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .topbar img { width: 128px; }
  .main { padding: 20px 16px 96px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--deep); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; padding: 4px 0; }
  .tabbar a.on { color: var(--text); }
  .tabbar a.on svg { color: var(--teal); }
  .tabbar svg { width: 22px; height: 22px; }
}

/* ---------- Surfaces ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; align-items: start; }
.g2 { grid-template-columns: 1.35fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .g2, .g3 { grid-template-columns: 1fr; } }
.empty { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r); }

/* ---------- Buttons and inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--r); padding: 11px 18px; font-weight: 650; cursor: pointer; text-decoration: none; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); white-space: nowrap; }
.btn:hover { border-color: #c9ced8; }
.btn.primary { background: var(--grad); color: #ffffff; border: 0; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 18px; height: 18px; }
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input[type=text], input[type=number], input[type=url], input[type=datetime-local], input[type=time], textarea, select {
  width: 100%; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--teal); }
textarea { resize: vertical; min-height: 90px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.chip.good { color: var(--good); border-color: rgba(43, 213, 118, .3); }
.chip.warn { color: var(--warn); border-color: rgba(245, 182, 56, .3); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(60% 50% at 50% 0%, rgba(26, 140, 255, .16), transparent 70%), var(--ink); }
.login-card { width: min(440px, 100%); text-align: center; }
.login-card img { width: min(340px, 90%); margin: 0 auto 22px; }
.login-card p { color: var(--muted); margin: 0 0 26px; }
.discord-btn { background: #5865f2; color: #fff; border: 0; width: 100%; padding: 14px; font-size: 16px; }
.discord-btn:hover { background: #4752c4; }
.notice { margin-top: 18px; padding: 12px 14px; border-radius: var(--r); background: rgba(255, 90, 110, .1); border: 1px solid rgba(255, 90, 110, .3); color: #9f1239; font-size: 14px; text-align: left; }
.dev-links { margin-top: 18px; font-size: 13px; color: var(--faint); }

/* ---------- Home ---------- */
.hello { margin-bottom: 22px; }
.continue { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.continue::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--grad); }
.continue .stage-tag { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.continue h2 { font-size: 22px; }
.continue p { margin: 6px 0 0; color: var(--muted); max-width: 56ch; }
@media (max-width: 600px) { .continue { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat b { display: block; font-family: var(--display); font-size: 24px; font-weight: 800; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.mini-route { display: flex; gap: 4px; margin-top: 14px; }
.mini-route i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; }
.mini-route i span { position: absolute; inset: 0 auto 0 0; border-radius: 3px; }

/* ---------- Tasks ---------- */
.task { display: flex; align-items: flex-start; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.check { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 2px solid #c9ced8; background: transparent; cursor: pointer; display: grid; place-items: center; margin-top: 1px; padding: 0; }
.check svg { width: 14px; height: 14px; opacity: 0; color: #ffffff; }
.task.done .check { background: var(--good); border-color: var(--good); }
.task.done .check svg { opacity: 1; }
.task.done .t-title { color: var(--faint); text-decoration: line-through; }
.task .t-meta { font-size: 12px; color: var(--faint); margin-top: 2px; }
.task .t-del { margin-left: auto; background: none; border: 0; color: var(--faint); cursor: pointer; padding: 2px 6px; }
.task .t-del:hover { color: var(--bad); }
.add-task { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- Map (the route) ---------- */
.route { position: relative; padding-left: 0; }
.stop { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding-bottom: 26px; }
.stop::before { content: ""; position: absolute; left: 31px; top: 64px; bottom: 0; width: 2px; background: repeating-linear-gradient(to bottom, var(--line) 0 6px, transparent 6px 12px); }
.stop.complete::before { background: var(--c); opacity: .7; }
.stop:last-child::before { display: none; }
.node { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.node svg.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.node .n { position: relative; font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--c); }
.stop.locked .node .n { color: var(--faint); }
.node .lock { position: absolute; bottom: -2px; right: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--deep); border: 1px solid var(--line); display: grid; place-items: center; }
.node .lock svg { width: 12px; height: 12px; color: var(--muted); }
.stop-body { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.stop.current .stop-body { border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset; }
.stop.locked .stop-body { opacity: .62; }
.stop-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.stop-top h2 { font-size: 20px; }
.killer { font-size: 12px; font-weight: 600; color: var(--c); }
.stop-goal { color: var(--muted); margin: 4px 0 12px; font-size: 14px; }
.mod-name { font-size: 12px; font-weight: 600; color: var(--faint); margin: 12px 0 4px; }
.lesson-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px; border-radius: var(--r-sm); text-decoration: none; }
.lesson-link:hover { background: var(--panel-2); }
.lesson-link .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c9ced8; flex: none; display: grid; place-items: center; }
.lesson-link.done .dot { background: var(--c); border-color: var(--c); }
.lesson-link.done .dot svg { width: 11px; height: 11px; color: #ffffff; }
.lesson-link .mins { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; }
.lesson-link.next { background: var(--panel-2); }
.lesson-link.next .lt { font-weight: 600; }
.lesson-link .nx { white-space: nowrap; font-size: 11px; font-weight: 700; color: var(--c); }

/* ---------- Lesson ---------- */
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { color: var(--text); }
.player { aspect-ratio: 16 / 9; background: #f2f4f7; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); margin: 18px 0; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.player.soon { display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px;
  background: radial-gradient(70% 70% at 50% 40%, rgba(25, 227, 207, .07), transparent 70%), #f6f7f9; }
.player.soon img { width: 56px; margin: 0 auto 12px; opacity: .8; }
.lesson-grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .lesson-grid { grid-template-columns: 1fr; } }
.task-box { border-left: 3px solid var(--c, var(--teal)); }
.task-box .lbl { font-size: 13px; font-weight: 600; color: var(--c, var(--teal)); margin-bottom: 6px; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 20px; }
.prose li { margin-bottom: 4px; }
.prose h3, .prose h4 { margin: 16px 0 8px; font-size: 15px; font-family: var(--body); font-style: normal; font-weight: 700; }
.side-list a { display: block; padding: 7px 10px; margin: 0 -10px; border-radius: var(--r-sm); text-decoration: none; font-size: 14px; color: var(--muted); }
.side-list a:hover { background: var(--panel-2); color: var(--text); }
.side-list a.on { color: var(--text); background: var(--panel-2); }
.side-list a.done::before { content: "✓ "; color: var(--good); }

/* ---------- Casper AI ---------- */
.ai { display: grid; grid-template-rows: auto 1fr auto; height: calc(100vh - 68px); max-width: 860px; margin: 0 auto; }
@media (max-width: 860px) { .ai { height: calc(100vh - 170px); } }
.modes { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 10px; }
.mode { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); }
.mode.on { background: var(--text); color: var(--ink); border-color: var(--text); }
.thread { overflow-y: auto; padding: 8px 2px 16px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; }
.msg.user { align-self: flex-end; background: var(--panel-2); border: 1px solid var(--line); padding: 10px 14px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; }
.msg.bot { align-self: flex-start; display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.msg.bot .face { width: 30px; height: 30px; border-radius: 50%; background: var(--deep); border: 1px solid var(--line); display: grid; place-items: center; }
.msg.bot .face img { width: 20px; }
.msg.bot .bubble { min-width: 0; }
.msg.bot .bubble pre { position: relative; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 12px; white-space: pre-wrap; font: 14px/1.55 var(--body); margin: 0 0 12px; }
.copy { position: absolute; top: 6px; right: 6px; font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; color: var(--muted); }
.lesson-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: rgba(25, 227, 207, .1); border: 1px solid rgba(25, 227, 207, .3); color: var(--teal); font-size: 13px; text-decoration: none; font-weight: 600; }
.msg-actions { display: flex; gap: 8px; margin-top: 6px; }
.msg-actions button { background: none; border: 0; color: var(--faint); font-size: 12px; cursor: pointer; padding: 2px 0; }
.msg-actions button:hover { color: var(--text); }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 4px; animation: pulse 1s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; }
.composer textarea { border: 0; background: transparent; min-height: 46px; max-height: 220px; resize: none; padding: 8px; }
.composer .btn { align-self: end; }
.starters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.starters button { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; cursor: pointer; color: var(--muted); font-size: 14px; }
.starters button:hover { color: var(--text); border-color: #c9ced8; }
@media (max-width: 600px) { .starters { grid-template-columns: 1fr; } }
.ai-intro { text-align: center; padding: 28px 8px 8px; }
.ai-intro img { width: 54px; margin: 0 auto 12px; }

/* ---------- Calendar ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); min-height: 150px; padding: 10px; }
.day.today { border-color: var(--teal); }
.day .dname { font-size: 12px; color: var(--muted); font-weight: 600; }
.day .dnum { font-family: var(--display); font-weight: 800; font-size: 20px; margin-bottom: 8px; }
.ev { display: block; border-radius: var(--r-sm); padding: 6px 8px; font-size: 12px; line-height: 1.35; margin-bottom: 6px; text-decoration: none; background: var(--panel-2); border-left: 3px solid var(--blue); }
.ev b { display: block; font-weight: 600; }
.ev.call { border-left-color: var(--teal); }
.ev.meetup { border-left-color: #a78bfa; }
.ev.deadline { border-left-color: var(--warn); }
@media (max-width: 860px) {
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; display: grid; grid-template-columns: 56px 1fr; gap: 10px; }
  .day .dnum { margin: 0; }
}

/* ---------- Tables / lists ---------- */
.list-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:hover td { background: var(--panel-2); cursor: pointer; }
.scroll-x { overflow-x: auto; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; min-width: 70px; }
.bar i { display: block; height: 100%; background: var(--grad); }
.board-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.board-row:last-child { border-bottom: 0; }
.board-row .pos { font-family: var(--display); font-weight: 800; width: 24px; color: var(--faint); }
.board-row .amt { margin-left: auto; font-weight: 700; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--text); border-color: var(--teal); }
.review-ai { background: var(--deep); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-top: 10px; }

#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--ink); padding: 10px 16px; border-radius: var(--r); font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 99; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 1000; background: rgba(11, 13, 18, .45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { position: relative; width: min(620px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin: auto; animation: rise .22s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.modal-x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #ffffff; display: grid; place-items: center; cursor: pointer; }
.modal-x svg { width: 16px; height: 16px; }
.modal-pad { padding: 26px 24px 24px; }

/* ---------- Developers ---------- */
.dev-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.dev-tools select { width: auto; min-width: 150px; }
.searchbox { flex: 1 1 280px; display: flex; align-items: center; gap: 8px; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 12px; }
.searchbox:focus-within { border-color: var(--teal); }
.searchbox svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.searchbox input { border: 0; background: transparent; padding: 10px 0; flex: 1; outline: none; min-width: 0; }
.searchbox.sm { flex: 0 1 280px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); padding: 0 6px; cursor: pointer; white-space: nowrap; }
.toggle input { accent-color: var(--teal); width: 16px; height: 16px; }
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.dev-card { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; transition: border-color .15s, transform .15s; }
.dev-card:hover { border-color: #c9ced8; transform: translateY(-2px); }
.dev-banner { height: 112px; background: center / cover no-repeat var(--deep); }
.dev-banner.big { height: 170px; }
.dev-banner.gen { position: relative; display: flex; align-items: flex-end; padding: 14px 16px 30px 104px; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--c) 55%, transparent), transparent 60%),
              repeating-linear-gradient(135deg, rgba(0,0,0,.03) 0 2px, transparent 2px 14px), #f6f7f9; }
.dev-banner.gen span { font-family: var(--display); font-weight: 800; font-size: 15px; line-height: 1.2; color: #fff; opacity: .92; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dev-banner.gen.big { padding-left: 24px; padding-bottom: 20px; align-items: flex-start; padding-top: 22px; }
.dev-banner.gen.big span { font-size: 22px; max-width: 70%; }
.dev-av { position: absolute; top: 76px; left: 16px; width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--panel); background: var(--panel-2); display: grid; place-items: center; font-weight: 800; font-size: 22px; overflow: hidden; color: var(--text); }
.dev-av img { width: 100%; height: 100%; object-fit: cover; }
.dev-av.big { top: 124px; left: 22px; width: 92px; height: 92px; font-size: 28px; }
.list-item .dev-av, .row > .dev-av { position: static; width: 40px; height: 40px; border-width: 0; font-size: 14px; flex: none; }
.dev-body { padding: 44px 16px 14px; display: flex; flex-direction: column; flex: 1; }
.dev-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 16px; }
.dev-name.big { font-size: 24px; }
.vet { color: var(--teal); display: inline-grid; }
.vet svg { width: 17px; height: 17px; }
.dev-name.big .vet svg { width: 22px; height: 22px; }
.dev-head { color: var(--muted); font-size: 14px; margin: 4px 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: #3d4552; }
.tag.more { color: var(--muted); }
.dev-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 16px; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #3d4552; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px rgba(43, 213, 118, .18); }
.status.busy::before { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 182, 56, .18); }
.loc { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); margin-top: 3px; }
.loc svg { width: 14px; height: 14px; }
.price { font-size: 14px; white-space: nowrap; }
.price.big { font-size: 18px; }
.dev-profile { padding: 54px 24px 24px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; align-items: center; }
.facts .loc { margin: 0; }
.vet-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: rgba(25, 227, 207, .07); border: 1px solid rgba(25, 227, 207, .25); margin-top: 6px; }
.vet-box > svg { width: 22px; height: 22px; color: var(--teal); flex: none; }
.work-link { display: block; padding: 9px 12px; margin-bottom: 6px; border-radius: var(--r-sm); background: var(--deep); border: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.work-link:hover { border-color: var(--teal); }
.btn svg { width: 18px; height: 18px; }

/* ---------- World map ---------- */
.world { height: min(62vh, 560px); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #eef1f5; }
.leaflet-container { background: #eef1f5 !important; font: 14px/1.4 var(--body); }
.pin-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 13px; border: 2px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.pin-av img { width: 100%; height: 100%; object-fit: cover; }
.pin-av.me { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(25, 227, 207, .3); }
.pin-av.casper { border: 0; padding: 2px; background: var(--grad); }
.pin-av.casper img { border-radius: 50%; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-control-zoom a { background: var(--panel) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { background: rgba(255,255,255,.8) !important; color: var(--faint) !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.pop b { font-size: 15px; }
.pop div { color: var(--muted); font-size: 13px; }
.pop .pop-sub { color: #3d4552; margin-top: 4px; }
.pop-soc { display: flex; gap: 6px; margin-top: 8px; }
.soc { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--text) !important; }
.soc:hover { border-color: var(--teal); }
.soc svg { width: 16px; height: 16px; }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 18px; }
.member { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.member .avatar { width: 42px; height: 42px; }
.m-main { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; }
.m-main b { font-size: 14px; }
.m-main span { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.m-main span svg { width: 13px; height: 13px; }
.m-main .m-sub { color: #3d4552; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.m-soc { display: flex; gap: 6px; }
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.ac-list:empty { display: none; }
.ac-list button { display: block; width: 100%; text-align: left; padding: 10px 12px; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.ac-list button:hover { background: var(--panel); }
@media (max-width: 860px) {
  .dev-tools select { flex: 1; min-width: 0; }
  .world { height: 52vh; }
  .modal-wrap { padding: 0; place-items: end center; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; overflow-y: auto; }
}
.dev-foot .loc { display: flex; }
.panel-head { flex-wrap: wrap; }
@media (max-width: 860px) {
  .dev-tools .searchbox { flex: 1 1 100%; }
  .dev-tools select { flex: 1 1 40%; min-width: 0; }
  .searchbox.sm { flex: 1 1 100%; }
}

/* ---------- Command centre ---------- */
.ink { color: var(--text); }
.week-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--teal); background: rgba(25, 227, 207, .1); border: 1px solid rgba(25, 227, 207, .3); border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.onboard { border-color: rgba(25, 227, 207, .35); background: linear-gradient(180deg, rgba(25, 227, 207, .06), transparent 60%), var(--panel); margin-bottom: 16px; }
.onb-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 860px) { .onb-steps { grid-template-columns: 1fr; } }
.onb { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--deep); border: 1px solid var(--line); text-decoration: none; font-size: 14px; font-weight: 500; }
.onb:hover { border-color: var(--teal); }
.onb-n { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--panel-2); border: 1px solid var(--line); }
.onb.done { color: var(--muted); }
.onb.done .onb-n { background: var(--good); border-color: var(--good); color: #ffffff; }
.onb-n svg { width: 14px; height: 14px; }
.kpi-mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.km { background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; text-align: center; }
.km b { display: block; font-size: 17px; }
.km span { font-size: 11px; color: var(--muted); line-height: 1.2; display: block; }
.km.good { border-color: rgba(43, 213, 118, .4); } .km.good b { color: var(--good); }
.km.bad { border-color: rgba(255, 90, 110, .45); } .km.bad b { color: var(--bad); }
@media (max-width: 500px) { .kpi-mini { grid-template-columns: repeat(3, 1fr); } }
.bneck { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: var(--r); background: rgba(255, 90, 110, .08); border: 1px solid rgba(255, 90, 110, .3); }
.bneck > svg { width: 20px; height: 20px; color: var(--bad); flex: none; margin-top: 1px; }
.bneck.ok { background: rgba(43, 213, 118, .08); border-color: rgba(43, 213, 118, .3); align-items: center; }
.bneck.ok > svg { color: var(--good); }
.quick { display: grid; gap: 8px; padding: 12px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r); text-decoration: none; }
.quick a:hover { background: var(--panel-2); }
.quick svg { width: 22px; height: 22px; color: var(--teal); flex: none; }
.quick span { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; }
.quick b { color: var(--text); font-size: 14px; }
.welcome { padding: 30px 26px 26px; text-align: center; }
.welcome img { width: 230px; margin: 0 auto 14px; }
.welcome p { color: var(--muted); margin: 6px 0 20px; }
.welcome-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; text-align: left; margin-bottom: 22px; }
.welcome-grid div { display: grid; grid-template-columns: 24px 1fr; column-gap: 10px; padding: 10px 12px; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r); }
.welcome-grid svg { width: 20px; height: 20px; color: var(--teal); grid-row: span 2; margin-top: 2px; }
.welcome-grid b { font-size: 14px; } .welcome-grid span { font-size: 12px; color: var(--muted); }
@media (max-width: 520px) { .welcome-grid { grid-template-columns: 1fr; } }

/* ---------- My plan ---------- */
.letter { border-left: 3px solid var(--teal); }
.letter-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.letter-head img { width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: var(--deep); border: 1px solid var(--line); }
.letter-head b { display: block; } .letter-head span { display: block; }
.diag { margin-top: 14px; padding: 14px; border-radius: var(--r); background: var(--deep); border: 1px solid var(--line); }
.diag .lbl, .task-box .lbl { font-size: 13px; font-weight: 600; color: var(--warn); margin-bottom: 6px; }
.focus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.focus-grid .panel + .panel { margin-top: 0; }
.focus { position: relative; }
.focus-n { font-family: var(--display); font-weight: 900; font-size: 30px; line-height: 1; color: var(--teal); margin-bottom: 6px; }
.focus h3 { font-size: 17px; margin-bottom: 6px; }
.acts { margin: 8px 0 0; padding-left: 18px; font-size: 14px; } .acts li { margin-bottom: 4px; }
.script { margin-top: 12px; } .script summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--teal); }
.script pre { position: relative; white-space: pre-wrap; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; font: 14px/1.55 var(--body); margin: 8px 0 0; }
.pending { display: flex; gap: 14px; align-items: flex-start; border-style: dashed; }
.pending > svg { width: 26px; height: 26px; color: var(--teal); flex: none; }
.weeks { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; margin-bottom: 14px; }
@media (max-width: 700px) { .weeks { grid-template-columns: repeat(6, 1fr); } }
.wk { position: relative; display: grid; place-items: center; height: 46px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line); text-decoration: none; overflow: hidden; }
.wk b { position: relative; font-family: var(--display); font-weight: 800; font-size: 17px; }
.wk i { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p); background: var(--good); }
.wk.now { border-color: var(--teal); } .wk.now b { color: var(--teal); }
.wk.on { background: var(--text); border-color: var(--text); } .wk.on b { color: var(--ink); }
.wk.full::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }

/* ---------- Numbers ---------- */
.funnel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (max-width: 860px) { .funnel { grid-template-columns: 1fr 1fr; } }
.fstep { position: relative; padding: 14px; border-radius: var(--r); background: var(--deep); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.fstep .fl { font-size: 13px; color: var(--muted); font-weight: 500; }
.fstep b { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.1; }
.fstep .ft { font-size: 12px; color: var(--faint); }
.fstep .fs { margin-top: 6px; font-size: 12px; font-weight: 700; }
.fstep.good { border-color: rgba(43, 213, 118, .4); } .fstep.good .fs, .fstep.good b { color: var(--good); }
.fstep.bad { border-color: rgba(255, 90, 110, .45); background: rgba(255, 90, 110, .06); } .fstep.bad .fs, .fstep.bad b { color: var(--bad); }
.num-grid { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 12px; }
.num-grid small { display: block; font-size: 11px; margin-top: 4px; }
.cash-bars { display: flex; align-items: flex-end; gap: 4px; height: 130px; }
.cb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.cb i { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--grad); }
.cb span { font-size: 10px; color: var(--faint); }

/* ---------- Playbooks ---------- */
.pb-group { font-size: 17px; margin: 20px 0 10px; }
.pb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pb { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.pb:hover { border-color: var(--teal); }
.pb span { font-size: 13px; color: var(--muted); }
.pb-body pre { position: relative; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px 12px; white-space: pre-wrap; font: 14px/1.55 var(--body); margin: 0 0 12px; }
.pb-body table { border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.modal .modal-pad { max-height: 86vh; overflow-y: auto; }

/* ---------- Admin plan editor ---------- */
.plan-ed fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin: 0 0 12px; display: grid; gap: 8px; }
.plan-ed legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 6px; }
.wk-ed summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
.wk-row { display: grid; grid-template-columns: 70px 1fr; gap: 6px 10px; margin-bottom: 10px; }
.wk-row b { grid-row: span 2; padding-top: 10px; font-size: 13px; }
.lesson-chip svg { width: 12px; height: 12px; flex: none; fill: currentColor; }
.pb-body pre, .script pre, .msg.bot .bubble pre { padding-right: 66px; }
.bank-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--good); margin-top: 4px; }
.bank-tag svg { width: 13px; height: 13px; }
.gates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------- Course grid (thumbnail cards) ---------- */
.stage { margin-bottom: 34px; }
.stage-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.stage-num { font-size: 12px; font-weight: 700; color: var(--c); }
.stage-head h2 { font-size: 22px; }
.stage-head p { margin: 4px 0 0; }
.stage-prog { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.stage-prog .bar { flex: 1; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.mod-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; transition: transform .15s, border-color .15s; }
.mod-card:hover { transform: translateY(-2px); border-color: var(--c); }
.mod-card.next { border-color: var(--c); box-shadow: 0 0 0 1px var(--c); }
.mod-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--deep); }
.mod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mod-card.locked .mod-thumb img { filter: grayscale(.85) brightness(.55); }
.mod-done, .mod-next { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.mod-done { background: var(--good); color: #ffffff; } .mod-done svg { width: 13px; height: 13px; }
.mod-next { background: var(--c); color: #ffffff; }
.mod-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mod-num { font-size: 12px; font-weight: 600; color: var(--muted); }
.mod-body h3 { font-size: 16px; }
.mod-body p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mod-lock { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--faint); }
.mod-lock svg { width: 14px; height: 14px; flex: none; }

/* ---------- Module page ---------- */
.mod-kicker { font-size: 13px; font-weight: 700; color: var(--c); margin-bottom: 6px; }
.player.soon { background-size: cover; background-position: center; }
.side-col { display: grid; gap: 16px; position: sticky; top: 20px; }
.side-col .panel + .panel { margin-top: 0; }
@media (max-width: 900px) { .side-col { position: static; } }
.keybox { border-left: 3px solid var(--c); }
.keybox .lbl { font-size: 13px; font-weight: 600; color: var(--c); margin-bottom: 6px; }
.keybox ul { margin: 0; padding-left: 18px; } .keybox li { margin-bottom: 4px; }
.guide { margin-top: 16px; }
.g-sec { padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.g-sec:first-child { padding-top: 6px; }
.g-sec h2 { font-size: 21px; margin-bottom: 10px; }
.g-sec .prose { font-size: 15.5px; line-height: 1.7; max-width: 70ch; }
.g-sec .prose pre { position: relative; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 66px 12px 14px; white-space: pre-wrap; font: 14px/1.55 var(--body); }
.toc a { font-size: 13.5px; }

/* ---------- Diagrams ---------- */
.dg { margin: 18px 0 6px; padding: 18px; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r-lg); }
.dg-title { font-family: var(--display); font-weight: 800; font-size: 16px; margin-bottom: 14px; }
.dg-cap { font-size: 13px; color: var(--muted); margin-top: 12px; }
.dg-row { display: flex; align-items: stretch; gap: 8px; }
.dg-step { flex: 1; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dg-step b { font-size: 14px; } .dg-step span:not(.dg-n) { font-size: 12.5px; color: var(--muted); }
.dg-n { font-family: var(--display); font-weight: 900; font-size: 18px; color: var(--c); }
.dg-arrow { align-self: center; width: 14px; height: 14px; border-top: 3px solid var(--c); border-right: 3px solid var(--c); transform: rotate(45deg); flex: none; opacity: .8; }
@media (max-width: 700px) { .dg-row { flex-direction: column; } .dg-arrow { transform: rotate(135deg); margin: -2px auto; } }
.dg-funnel { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dg-funnel .dg-title, .dg-funnel .dg-cap { align-self: stretch; }
.dg-fl { display: flex; justify-content: space-between; gap: 10px; padding: 11px 16px; border-radius: var(--r-sm); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 30%, var(--panel)), var(--panel)); border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); font-size: 14px; }
.dg-fl span { font-weight: 700; color: var(--c); white-space: nowrap; }
.dg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .dg-cols { grid-template-columns: 1fr; } }
.dg-col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.dg-col h4 { margin: 0 0 8px; font-size: 14px; }
.dg-col.bad h4 { color: var(--bad); } .dg-col.good h4 { color: var(--good); }
.dg-col ul { margin: 0; padding-left: 18px; font-size: 14px; } .dg-col li { margin-bottom: 4px; }
.dg-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.dg-line small { display: block; color: var(--muted); font-size: 12px; }
.dg-line b { white-space: nowrap; }
.dg-line.total { border-bottom: 0; border-top: 2px solid var(--c); margin-top: 4px; font-weight: 700; } .dg-line.total b { color: var(--c); font-size: 18px; }
.dg-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.dg-card { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 3px; }
.dg-card em { font-style: normal; font-weight: 800; color: var(--c); }
.dg-card span { font-size: 12.5px; color: var(--muted); }
.dg-ring { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.dg-core { grid-column: 1 / -1; text-align: center; font-weight: 700; color: var(--c); font-size: 13px; }
.g-sec blockquote,.md blockquote{margin:10px 0;padding:10px 14px;border-left:3px solid var(--c,#19e3cf);background:rgba(0,0,0,.035);border-radius:0 10px 10px 0;color:inherit}
.g-sec code{background:rgba(0,0,0,.06);padding:1px 5px;border-radius:5px;font-size:.92em}

/* ---------- Clean light theme (Inter Tight, highlight bar) ---------- */
html, body { background-color: #fbfaf8; background-image: none; }
h1, h2, h3, .dg-title, .stat b, .fstep b, .focus-n, .wk b, .day .dnum, .node .n, .dg-n, .board-row .pos { font-family: var(--display); font-weight: 800; letter-spacing: -0.035em; }
h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; }
h2 { font-size: 22px; letter-spacing: -0.03em; }
h3 { letter-spacing: -0.02em; font-weight: 700; }
.hl { background-image: var(--grad); background-repeat: no-repeat; background-size: 100% .32em; background-position: 0 86%; padding: 0 .06em; }
.shell { background: none; }
.rail { background: rgba(255,255,255,.96); }
.nav a.on { background: #f2f4f7; box-shadow: inset 3px 0 0 var(--text); }
.panel, .mod-card, .dev-card, .stat, .continue, .stop-body, .pb, .day { box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.btn.primary { background: var(--text); color: #fff; }
.btn.primary:hover { filter: none; background: #262a33; }
.btn { background: #fff; }
.mode.on { background: var(--text); color: #fff; }
#toast { background: var(--text); color: #fff; }
.mod-card:hover, .dev-card:hover { border-color: #c9ced8; box-shadow: 0 8px 24px rgba(16,24,40,.08); }
.mod-card.next { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.mod-next { background: var(--text); color: #fff; }
.mod-card.locked .mod-thumb img { filter: grayscale(1) opacity(.55); }
.mod-num, .stage-num, .mod-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; }
.mod-num { color: var(--faint); }
.stage-num, .mod-kicker { color: var(--muted); }
.stage-head h2 { font-size: 26px; }
.player { border-color: var(--line); }
.player.soon { color: var(--muted); }
.keybox, .task-box, .letter { border-left-color: var(--text); }
.keybox .lbl, .task-box .lbl { color: var(--text); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 700; }
.dg { background: #fff; }
.dg-step { border-top: 3px solid var(--text); background: var(--deep); }
.dg-n, .dg-card em, .dg-fl span, .dg-line.total b, .dg-core { color: var(--text); }
.dg-card { border-left-color: var(--text); background: var(--deep); }
.dg-arrow { border-color: var(--faint); }
.dg-fl { background: var(--deep); border-color: var(--line); }
.dg-line.total { border-top-color: var(--text); }
.dg-col { background: var(--deep); }
.g-sec blockquote { border-left-color: var(--text); background: var(--deep); }
.lesson-chip { background: #eefaf7; border-color: #bfeee4; color: #067a6e; }
.week-tag { background: #eefaf7; border-color: #bfeee4; color: #067a6e; }
.onboard { background: #fff; border-color: var(--line); }
.vet-box { background: #eefaf7; border-color: #bfeee4; }
.dev-banner.gen { background: linear-gradient(#eef0f4 1px, transparent 1px) 0 0/22px 22px, linear-gradient(90deg, #eef0f4 1px, transparent 1px) 0 0/22px 22px, #fafbfc; }
.dev-banner.gen span { color: var(--text); opacity: 1; }
.dev-av { border-color: #fff; }
.login { background: transparent; }
.notice { color: #9f1239; }
.topbar { border-bottom-color: var(--line); }
.player.soon { place-items: end start; padding: 16px; text-align: left; }
.player.soon > div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; color: var(--text); box-shadow: 0 4px 14px rgba(16,24,40,.08); }
.leaflet-container { background: #f7f8fa !important; }
.pin-av { border-color: #fff; box-shadow: 0 4px 12px rgba(16,24,40,.18); }
@media (max-width: 600px) { .player.soon { padding: 10px; } .player.soon > div { padding: 5px 10px; font-size: 13px; } .player.soon > div .small { display: none; } }
.grid > * { min-width: 0; }
select, input, textarea { max-width: 100%; }
@media (max-width: 480px) { .grid[style*="1fr 1fr"] { grid-template-columns: 1fr !important; } }
.dev-banner.big { background-position: left center; }

/* ===== v8: quiz-site look (thin and bold Inter Tight, warm paper, pills, one accent) ===== */
:root {
  --ink: #fbfaf8; --deep: #fbfaf8; --panel: #ffffff; --panel-2: #f3f2ef; --line: #ebe8e3;
  --text: #111214; --muted: #80838a; --faint: #a3a6ad;
  --r-lg: 18px; --r: 14px; --r-sm: 10px;
}
html, body { background: #fbfaf8; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 600px at 8% -5%, rgba(120,170,255,.13), transparent 60%), radial-gradient(800px 600px at 100% 105%, rgba(255,190,150,.16), transparent 60%); }
.shell { background: linear-gradient(to right, #fbfaf8 235px, var(--line) 235px 236px, transparent 236px); }
@media (max-width: 860px) { .shell { background: none; } }
.rail { background: #fbfaf8; }
h1 { font-weight: 200; letter-spacing: -.045em; line-height: .98; font-size: clamp(34px, 5vw, 56px); }
h1 .hl, h1 b, h1 strong { font-weight: 700; }
h2 { font-weight: 300; letter-spacing: -.03em; font-size: 24px; line-height: 1.05; }
h2 b, h2 strong { font-weight: 700; }
h3 { font-weight: 600; letter-spacing: -.01em; }
.panel, .mod-card, .stage-card { background: #fff; border-color: var(--line); box-shadow: 0 1px 0 rgba(17,18,20,.02); }
.btn { border-radius: 999px; padding: 11px 20px; font-weight: 600; background: #fff; }
.btn.primary { background: #111214; color: #fff; border: 0; }
.btn.primary:hover { filter: none; background: #26282c; }
.btn.sm { padding: 7px 14px; }
input, select, textarea { border-radius: 14px; }
.nav a { border-radius: 999px; }
.nav a.on { box-shadow: none; background: #f0eeea; font-weight: 600; }
.chip { background: #f3f2ef; }
.hl { background-size: 100% .3em; }
.eyebrow, .crumb { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; letter-spacing: .01em; }
.eyebrow::before { content: ""; width: 20px; height: 2px; border-radius: 2px; background: var(--grad); flex: none; }
.big-thin { font-weight: 200; letter-spacing: -.045em; line-height: .98; font-size: clamp(44px, 8vw, 72px); }
.big-thin b { font-weight: 700; }
/* payment countdown, top right */
.main { position: relative; }
.paywrap { position: absolute; top: 18px; right: clamp(16px, 4vw, 48px); z-index: 5; }
.paychip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.paychip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.paychip.soon::before { background: #f59e0b; }
.paychip b { font-weight: 700; }
.topbar .paychip { font-size: 11px; padding: 5px 10px; }
@media (max-width: 860px) { .paywrap { display: none; } .topbar { background: rgba(251,250,248,.92); } }
@media (min-width: 861px) { .topbar .paychip { display: none; } }
.kit-skills { display: grid; gap: 10px; }
.kit-skill { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, #f6f5f3, #ecebe7); }
.kit-skill .btn { background: #fff; }
@media (max-width: 560px) { .kit-skill { flex-direction: column; align-items: flex-start; } }
.week-tag::before { content: ""; display: inline-block; width: 14px; height: 2px; border-radius: 2px; background: var(--grad); margin-right: 8px; vertical-align: middle; }

/* ===== v8.1: fixes from visual QA ===== */
:root { --muted: #6b6e76; --faint: #8a8d94; }
.lesson-grid { grid-template-columns: minmax(0, 1fr) 300px; }
.lesson-grid > *, .grid > *, .page-head > * { min-width: 0; }
pre, table { max-width: 100%; overflow-x: auto; }
pre { padding-top: 38px; white-space: pre-wrap; word-break: break-word; }
pre .copy { top: 6px; }
.continue::before { display: none; }
.dg-step { border-top: 1px solid var(--line); background: #fff; flex: 1 1 140px; }
.dg-flow { flex-wrap: wrap; }
.dg-n { font-weight: 700; }
.dg-step .dg-n::before { content: ""; display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--grad); margin-bottom: 8px; }
.dg-card, .task-box, .keybox, .letter { border-left: 1px solid var(--line); }
.dg-card { background: #fff; }
.task-box, .keybox { background: #fff; }
.kit-skill { background: #fff; }
.mod-card.locked .mod-thumb img { opacity: .75; filter: grayscale(.6); }
h1 { font-weight: 200; }
.hl { font-weight: 700; }
:focus-visible { outline: 2px solid #111214; outline-offset: 3px; }
.paychip::before { background: #16a34a; }
.paychip.soon::before { background: #d97706; }
@media (max-width: 400px) { .topbar .paychip .amt { display: none; } .topbar .paychip::before { display: none; } }
@media (pointer: coarse) {
  .check { position: relative; width: 28px; height: 28px; }
  .check::after { content: ""; position: absolute; inset: -10px; }
  .side-list a { padding: 12px 10px; }
  .btn, .btn.sm { min-height: 44px; }
  .copy { min-height: 36px; min-width: 44px; }
  .tabbar a { font-size: 12px; } .tabbar a.on { font-weight: 600; color: var(--text); }
}
.atabs, .tabs { overflow-x: auto; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); white-space: nowrap; }
@media (max-width: 700px) { table { display: block; overflow-x: auto; } }

/* v9e fixes */
.btn.discord-btn, a.btn.discord-btn { background: #5865f2; color: #fff; border: 0; border-radius: 999px; }
.btn.discord-btn:hover { background: #4752c4; color: #fff; }
.rail { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; }
.rail .nav { flex: none; }
.rail .me { flex: none; position: sticky; bottom: -22px; background: inherit; margin-top: auto; }
.rail .navh{font-size:11px;letter-spacing:.08em;text-transform:uppercase;opacity:.5;padding:14px 12px 4px;font-weight:600}
.dev-needs{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px;margin-top:10px}
.dev-need-opt{position:relative;cursor:pointer}.dev-need-opt input{position:absolute;opacity:0;inset:0;cursor:pointer}
.dev-need-opt span{display:flex;align-items:center;gap:10px;padding:12px 14px;border:2px solid var(--line);border-radius:12px;min-height:50px;font-weight:600}
.dev-need-opt span::before{content:"";width:18px;height:18px;border:2px solid var(--line);border-radius:5px;flex:none}
.dev-need-opt input:checked+span{border-color:#1a8cff;background:#1a8cff18}.dev-need-opt input:checked+span::before{background:#1a8cff;border-color:#1a8cff;box-shadow:inset 0 0 0 3px #fff}
.dev-need-opt input:focus-visible+span{outline:2px solid #1a8cff;outline-offset:2px}
.dev-spec{margin:2px 0 0;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;opacity:.65}
.dev-up img{display:block;width:72px;height:72px;border-radius:50%;object-fit:cover;margin-bottom:8px}.dev-up img.wide{width:100%;height:80px;border-radius:10px}

/* a11y + phone fixes from the review round */
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px; }
  .modal-x, .modal .close, button.close { min-width: 44px; min-height: 44px; }
  .btn.sm, .chip-btn { min-height: 40px; }
}
