/* =========================================================
   Wahaj Brand Book v1.0 — type roles, components and shell
   Loaded after the page styles so the brand system wins.
   ========================================================= */

/* ---------- type: Sora for display and numbers, Readex Pro for the interface ---------- */
body { font-family: var(--font)}
h1, h2, h3, h4, .page-title, .p-title, .ob-title, .greet h2, .mt-head h1, .gp-head h1, .set-head h1, .set-h2, .st-head h1, .t-head h1,
.c-title h1, .c-title h2, .fm-t, .ms-b h3, .mcard .mb b, .pcard2 .pb b, .ccard b, .pstat b, .gp-rd h3, .gp-me-t b, .gp-lab b, .gp-map-h h3, .gp-sec-h h3,
.wa-title, .kx h2, .modal-head h3, .section-h, .land-head, .splash-kdb, .av-name, .gp-lvl, .tbn-t b, .mt-cur .cn, .c-stats b, .hud-card b, .xp-rule em, .xp-choice span,
.gp-nx b, .gp-wk-h b, .gp-car-i b, .gp-car-i em, .gp-season b, .ob-sub + .x { font-family: var(--font-display)}
h1, h2, h3, .page-title, .p-title, .ob-title, .mt-head h1, .gp-head h1, .set-head h1, .st-head h1, .t-head h1 { letter-spacing: -.01em; text-wrap: balance}
.tnum, .pstat b, .c-stats b, .xp-rule em, .gp-car-i em { font-variant-numeric: tabular-nums}
code, .mono, .vdur, .vr-time { font-family: var(--font-mono)}

/* brand scale: page title (H1) Sora 600 30/36, hero display Sora 700 44/52 */
.page-title, .p-title, .mt-head h1, .gp-head h1, .set-head h1 { font-size: 32px; font-weight: 600; line-height: 1.15}
.h-hero h1 { font-size: 50px; font-weight: 700; line-height: 1.04; letter-spacing: -.02em}
.ob-title { font-size: 44px; font-weight: 700; letter-spacing: -.015em}
.greet h2 { font-size: 24px; font-weight: 600}
.section-h, .gp-map-h h3, .gp-sec-h h3 { font-size: 17px; font-weight: 600}
.eyebrow, .h-hero .eyebrow { font-family: var(--font); font-weight: 600; letter-spacing: .16em}

/* ---------- buttons ---------- */
.btn { font-weight: 600; border-radius: 10px; transition: background var(--motion-fast), box-shadow var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast)}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: none}
.btn-primary:hover { background: var(--accent-hi); box-shadow: none}
.btn-primary:active { background: var(--accent-deep)}
.btn-primary[disabled], .btn-primary.is-disabled { background: var(--tile-hi); color: var(--faint); box-shadow: none}
.btn-ghost { background: transparent; border: 1px solid var(--line-2); color: var(--text)}
.btn-ghost:hover { background: var(--panel-2); border-color: var(--line-3)}
.btn-outline { background: rgba(124, 124, 124, 0.08); color: var(--accent-hi); border-color: rgba(0, 255, 111, .28)}
.btn-outline:hover { background: rgba(124, 124, 124, 0.14)}
.ob-btn { border-radius: 12px}

/* ---------- tags (uppercase, tinted) and pills (sentence case) ---------- */
.badge { height: 22px; padding: 0 8px; border-radius: 5px; border-width: 1px; font-family: var(--font); font-weight: 600; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-hi); border-color: rgba(0, 255, 111, .3); background: rgba(10, 10, 10, 0.78); backdrop-filter: blur(6px)}
.badge.blue { color: var(--orbit-400); border-color: rgba(139, 92, 246, 0.34); background: rgba(10, 10, 10, 0.78)}
.badge.gray { color: var(--text-2); border-color: var(--line-2); background: rgba(18, 18, 18, 0.88)}
.badge.warn { color: var(--solar-500); border-color: rgba(255, 159, 10, 0.3); background: rgba(10, 10, 10, 0.78)}
.badge.solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent)}
.chip { height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12px; font-weight: 500; color: var(--text-2); background: var(--panel-2); border-color: var(--line-2)}
.status-tag { border-radius: 7px; font-weight: 500; background-color: var(--panel)}
.status-tag.good { background: var(--panel)}
.status-tag.warn { background: var(--panel)}

/* ---------- tabs: active tab gets surface-2 and a 2 px Glow underline ---------- */
.pill-tab { position: relative; border-radius: 8px; background: transparent; border-color: var(--line); color: var(--text-2); font-weight: 500}
.pill-tab:hover { color: var(--text); background: var(--panel-2)}
.pill-tab.on { background: var(--panel-2); color: var(--text); border-color: var(--line-2); box-shadow: none}
.pill-tab.on::after { content: ""; position: absolute; inset-inline-start: 14px; inset-inline-end: 14px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent)}

/* ---------- inputs ---------- */
.field, .search, .ask, .mt-input, .aip-in, .modal-body .txt, .modal-body textarea, .notes-ta { background: var(--panel); border-color: var(--line-2); border-radius: 10px}
.field:focus-within, .search:focus-within, .ask:focus-within, .mt-input:focus-within, .aip-in:focus-within, .modal-body .txt:focus, .modal-body textarea:focus { border-color: var(--accent); outline: 3px solid rgba(0, 255, 111, .18); outline-offset: 0; box-shadow: none}
.field input::placeholder, .search input::placeholder, .ask input::placeholder, .mt-input input::placeholder { color: var(--muted)}
:focus-visible { outline: 2px solid var(--accent-hi)}

/* ---------- progress: Glow for tasks, Nebula for XP ---------- */
.progress { background: var(--tile-hi)}
.progress > i { background: var(--accent)}
.progress.xp > i, .xp-bar i { background: var(--xp-bar) !important}

/* ---------- surfaces: depth from the surface ladder and a 1 px border ---------- */
.modal-wrap { background: rgba(4, 4, 4, 0.66)}
.modal { background: var(--panel); border-color: var(--line-2); border-radius: 20px; box-shadow: none}
.dd-menu, .pop, .toast { background: var(--panel-2); border-color: var(--line-2); box-shadow: none; border-radius: 12px}
.pop { border-color: rgba(0, 255, 111, .35)}
.toast { font-weight: 500}
.toast .t-ico { background: rgba(124, 124, 124, 0.14); color: var(--accent-hi)}
.st-card, .mcard, .pcard2, .ccard, .fm, .fields, .kdb, .h-hero, .mt-head, .mt-conv, .mt-cur, .mt-tools, .mt-prof, .mt-box, .tool, .p-side, .m-side .ms-card, .pstat, .newp, .gp-map, .gp-rd, .gp-weeks, .gp-car, .gp-next, .set-card, .set-nav, .av-stage, .av-edit { border-radius: 14px}
.mcard.on, .pcard2.on, .card.selected { border: 1px solid rgba(0, 255, 111, .55); box-shadow: none}

/* ---------- shell: sidebar per spec (44 px items, 20 px icons, 14 px labels) ---------- */
.side { background: var(--side); border-inline-end: 1px solid #161617}
.side-brand { inset-inline-start: 26px; top: 24px; gap: 14px}
.side-nav { inset-inline-start: 12px; inset-inline-end: 12px; top: 96px; gap: 4px}
.side-nav button { height: 44px; gap: 12px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--text-2); transition: background var(--motion-fast), color var(--motion-fast)}
.side-nav button .ico { width: 20px; height: 20px}
.side-nav button:hover { background: var(--panel-2); color: var(--text)}
.side-nav button.on { background: rgba(124, 124, 124, 0.16); color: var(--accent-hi); box-shadow: none}
.side-nav button.on::before { display: none}
.side-sys b { color: var(--text-2); font-weight: 500}
.topbar .tb-icon { color: var(--text-2)}
.topbar .tb-icon:hover { color: var(--text); background: var(--panel-2)}
.tb-av { outline: 2px solid var(--accent); outline-offset: 0; box-shadow: none}

/* ---------- mission stepper (signature component) ---------- */
.st-steps { justify-content: flex-start; gap: 0; padding: 0 18px}
.st-steps.bare { padding-block: 0 0; padding-inline: 60px 180px}
.bstep { display: flex; align-items: center; gap: 8px; height: 40px; padding-block: 0 0; padding-inline: 7px 14px; border-radius: 999px; flex: none; font-size: 13.5px; font-weight: 500; color: var(--muted); border: 1px solid transparent; white-space: nowrap; transition: background var(--motion-fast), border-color var(--motion-fast)}
.bstep i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--font-display); font-style: normal; border: 1.5px solid var(--line-2); flex: none}
.bstep:hover { background: var(--panel-2); color: var(--text)}
.bstep.done { color: var(--text)}
.bstep.done i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink)}
.bstep.now { color: var(--text); border-color: rgba(0, 255, 111, .55); box-shadow: none; background: rgba(124, 124, 124, 0.06)}
.bstep.now i { border-color: var(--accent); color: var(--accent-hi)}
.bstep.locked { opacity: .5}
.bstep .chev { color: var(--accent-hi); margin-inline-start: 2px; display: grid}
.bstep .chev.pulse { animation: nudge 1.4s ease-in-out infinite}
.blink { flex: 1 0 20px; height: 1.5px; min-width: 20px; background: var(--line-2)}
.blink.done { background: var(--accent-deep)}

/* ---------- mission checklist: circles, Glow when done ---------- */
.st-check .check, .t-check .check { border-radius: 50%; width: 18px; height: 18px; border-color: var(--faint)}
.st-check .check.on, .t-check .check.on { background: var(--accent); border-color: var(--accent)}
.st-check h3 span, .t-check h3 span { color: var(--accent-hi)}

/* ---------- mentor chat: mentor bubbles left on surface-2, builder bubbles right in Glow tint ---------- */
.msg .bub { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; border-start-start-radius: 4px; color: var(--text)}
.msg.me { grid-template-columns: 1fr 58px}
.msg.me > .av { order: 2}
.msg.me > div:last-child { order: 1; display: grid; justify-items: end}
.msg.me .meta { text-align: end}
.msg.me .bub { background: rgba(124, 124, 124, 0.1); border-color: rgba(0, 255, 111, .3); border-radius: 14px; border-start-end-radius: 4px}
.qp button { border-radius: 10px; background: rgba(124, 124, 124, 0.06); border-color: rgba(0, 255, 111, .22)}

/* ---------- rewards: XP is Nebula, levels too ---------- */
.gp-ring-fg { stroke: var(--nebula-500); filter: none}
.gp-lvl { background: var(--nebula-500); color: var(--text)}
.xp-rule.fixed .xp-bar i, .xp-rule.reflect .xp-bar i, .xp-rule.complete .xp-bar i { background: var(--xp-bar)}
.gp-howxp { color: var(--nebula-400); background: rgba(139, 92, 246, .14); border-color: rgba(139, 92, 246, .34)}

/* ---------- splash: logo lockup, powered-by line ---------- */
.splash-brand { top: 318px; gap: 0}
.splash-power { position: absolute; inset-inline-start: 0; inset-inline-end: 0; bottom: 86px; text-align: center; font-size: 12.5px; letter-spacing: .08em; color: var(--muted)}
.ob-brand { gap: 0}

/* ---------- mascot: the WAHAJ Mentor robot in Mentor contexts ---------- */
.mt-prof .rb { position: absolute; inset-inline-end: 14px; top: 10px; width: 84px; border-radius: 12px}
.st-mentor img.robot, .t-mentor img.robot { position: absolute; inset-inline-end: 12px; top: 8px; width: 64px; height: 64px; object-fit: cover; border-radius: 12px}
.msg .av img { width: 100%; height: 100%; object-fit: cover}

@media (prefers-reduced-motion: reduce) { .bstep .chev.pulse { animation: none} }

/* Mentor and AI headings take Nebula, the AI colour */
.st-mentor h3, .t-mentor h3, .mt-prof h3 { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--nebula-400)}
.c-mentor b { color: var(--nebula-400)}
.c-mentor img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; flex: none}

/* ---------- density: Readex Pro sets wider than the old face, so dense panels step down a little ---------- */
.mt-msg { font-size: 14px; line-height: 1.45; min-height: 140px}
.t-mentor .mt-msg { font-size: 13.5px; min-height: 118px}
.mt-hint { font-size: 13px; padding: 10px; gap: 10px}
.st-mentor .online, .t-mentor .online { width: calc(100% - 78px) !important; flex-wrap: wrap; row-gap: 6px}
.lib-filter button { font-size: 11.5px; padding: 0 4px}
.vtab { font-size: 13px; padding: 0 10px; gap: 7px}
.t-acts button { font-size: 13px}
.e-metric b { font-size: 18px}
.e-metric small { font-size: 12px}
.e-metric em { font-size: 10.5px}
.fm-t { font-size: 18px !important}
.fm-d { font-size: 13.5px !important; line-height: 1.35}
.fm-h small { font-size: 13px}
.qp button { font-size: 12.5px; gap: 7px}
.ccard .cp { font-size: 12.5px}
.o-cert .btn { font-size: 13px}
.o-c { font-size: 13.5px; padding: 4px 0}
.o-sk { padding: 7px 0}
.o-sk small { font-size: 12px}
.st-mentor img.robot, .t-mentor img.robot { width: 52px; height: 52px; top: 10px; inset-inline-end: 12px}
.st-mentor .online, .t-mentor .online { width: calc(100% - 60px) !important; flex-wrap: nowrap; gap: 6px}
.st-mentor .say-btn, .t-mentor .say-btn { height: 24px; padding: 0 8px; font-size: 11.5px; gap: 4px}
.st-mentor .mt-msg { margin-top: 16px; min-height: 130px}
.t-mentor .mt-msg { margin-top: 16px}
.lib-filter button { padding: 0 5px !important}
.vtabs { gap: 3px}
.vtab { padding: 0 8px; font-size: 12.5px}
.e-metrics > .e-metric { padding-top: 8px}
.e-metric b { font-size: 17px; line-height: 1.15}
.e-metric small, .e-metric em { line-height: 1.25}
.st-view .vtab { font-size: 12px !important; padding: 0 7px !important; gap: 5px}
.e-metrics > .e-metric { height: 94px}
.e-metric .progress { bottom: 10px}
.tool .rq button { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%}
.tool .rq button .ico { vertical-align: -2px; margin-inline-end: 6px}
