/* =========================================================
   Mentor — a full chat page (positions are inside .app-main, 1226 x 1004).
   Left: chat history grouped by mission and project. Right: the open chat in one
   reading column, with a rounded composer docked at the bottom.
   ========================================================= */

/* ---------- history panel ---------- */
.chatpage .mh { position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 276px; display: flex; flex-direction: column; border-inline-end: 1px solid #1d1d1f; background: #0a0a0b}
.mh-top { display: flex; align-items: center; gap: 6px; padding: 14px 12px 8px}
.mh-new { flex: 1; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border-radius: 10px; font-size: 15px; font-weight: 600; color: #f5f5f7}
.mh-new:hover, .mh-ib:hover { background: #161617}
.mh-ib { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; color: #c7c7cc}
.mh-ib.sm { width: 28px; height: 28px; border-radius: 8px; color: #98989d}
.mh-ib.sm:hover { color: var(--accent)}
.mh-ib.on { color: var(--accent)}
.mh-search { display: flex; align-items: center; gap: 9px; height: 40px; margin: 2px 12px 6px; padding: 0 12px; border-radius: 10px; border: 1px solid #232325; background: #111112; color: #98989d; cursor: text}
.mh-search:focus-within { border-color: #424245}
.mh-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font: inherit; font-size: 14.5px; color: var(--text)}
.mh-search input::placeholder { color: #98989d}
.mh-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px 18px}
.mh-sec { display: flex; align-items: center; gap: 8px; margin: 18px 8px 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #98989d}
.mh-sec em { font-style: normal; font-size: 11.5px; font-weight: 500; letter-spacing: 0; color: #6e6e73}

.mh-fold { display: flex; align-items: center; gap: 2px; padding-inline-end: 4px; border-radius: 12px}
.mh-fold:hover { background: #161617}
.mh-fh { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 6px; text-align: start; font-size: 14.5px; font-weight: 600; color: #e5e5ea}
.mh-chev { flex: none; color: #98989d; transition: transform .15s}
.mh-fold.open .mh-chev { transform: rotate(90deg)}
.mh-fi { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; border: 1px solid #2c2c2e; background: #161617; color: var(--accent)}
.mh-fx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px}
.mh-fx small { font-size: 12px; font-weight: 400; color: #98989d}
.mh-tag { font-style: normal; font-weight: 700; color: var(--accent)}
.mh-tag::after { content: ' · '; font-weight: 400; color: #98989d}
.mh-fold.now .mh-fi { border-color: var(--accent)}
.mh-fn { line-height: 1.3; overflow-wrap: anywhere}
.mh-fh em { font-style: normal; font-size: 12px; font-weight: 500; color: #98989d}
.mh-list { margin-block: 0 8px; margin-inline: 21px 0; padding-inline-start: 11px; border-inline-start: 1px solid #232325}
.mh-row.ctx { padding-inline-start: 6px}
.mh-ri { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 7px; background: #161617; color: #98989d}
.mh-row.on .mh-ri { color: var(--accent)}
/* no chats yet: a friendly card in place of empty lists */
.mh-hello { display: flex; gap: 10px; align-items: center; margin: 14px 4px 0; padding: 12px; border-radius: 12px; border: 1px solid #232325; background: #111112}
.mh-hello img { width: 36px; height: 36px; flex: none; border-radius: 50%}
.mh-hello b { display: block; font-size: 14px; color: #f5f5f7}
.mh-hello small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: #98989d}

.mh-row { display: flex; align-items: center; min-height: 38px; border-radius: 9px}
.mh-row:hover { background: #161617}
.mh-row.on { background: #1d1d1f}
.mh-open { flex: 1; min-width: 0; display: block; padding: 8px 10px; text-align: start; font-size: 14px; color: #d2d2d7}
.mh-row.on .mh-open { color: #ffffff; font-weight: 500}
.mh-t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.mh-open small { display: block; margin-top: 1px; font-size: 12px; color: #98989d}
.mh-d { flex: none; padding-inline-end: 10px; font-size: 12px; color: #86868b}
.mh-more { display: none; flex: none; width: 30px; height: 30px; margin-inline-end: 4px; place-items: center; border-radius: 8px; color: #c7c7cc}
.mh-more:hover { background: #2c2c2e; color: #ffffff}
.mh-row:hover .mh-d, .mh-row.on .mh-d { display: none}
.mh-row:hover .mh-more, .mh-row.on .mh-more { display: grid}
.mh-none { display: block; margin: 4px 8px 8px; font-size: 13px; line-height: 1.45; color: #98989d; text-align: start}
button.mh-none:hover { color: var(--accent)}
.mh-add { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 6px; border-radius: 12px; font-size: 14.5px; font-weight: 600; color: #c7c7cc}
.mh-add .mh-fi { color: #c7c7cc}
.mh-add:hover { background: #161617; color: var(--accent)}
.mh-add:hover .mh-fi { color: var(--accent)}

/* ---------- chat ---------- */
.chatpage .cv { position: absolute; inset-inline-start: 276px; inset-inline-end: 0; top: 0; bottom: 0; display: flex; flex-direction: column; background: var(--bg)}
.chatpage .cv.wide { inset-inline-start: 0}
.cv-head { flex: none; display: flex; align-items: center; gap: 4px; height: 62px; padding: 0 14px}
.cv-head .sp, .cv-tools .sp { flex: 1}
.cv-model { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 10px; font-size: 17px}
.cv-model b { font-weight: 600; color: #f5f5f7}
.cv-model span { font-size: 15px; color: #a1a1a6}
.cv-model .ico { color: #a1a1a6}
.cv-model:hover { background: #161617}
.cv-ctx { display: flex; align-items: center; gap: 8px; height: 36px; margin-inline-end: 6px; padding: 0 12px; border-radius: 999px; border: 1px solid #2c2c2e; font-size: 14px; color: #d2d2d7}
.cv-ctx .ico:first-child { color: var(--accent)}
.cv-ctx .ico:last-child { color: #98989d}
.cv-ctx:hover { border-color: var(--accent-line)}

.cv-scroll { flex: 1; min-height: 0; overflow-y: auto}
.cv-col { width: 720px; max-width: calc(100% - 48px); margin: 0 auto; padding: 14px 0 34px; display: grid; gap: 28px}
.cv.wide .cv-col, .cv.wide .cv-box, .cv.wide .cv-sugg { width: 780px}
.cv-u { display: flex; justify-content: flex-end}
.cv-ub { max-width: 78%; padding: 11px 18px; border-radius: 22px; background: #1d1d1f; font-size: 15.5px; line-height: 1.55; color: #f5f5f7; white-space: pre-wrap; overflow-wrap: anywhere}
.cv-ub .vtr { margin-top: 8px; font-size: 14px; color: #d2d2d7}
.cv-a { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: start}
.cv-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover}
.cv-a .typing { padding-top: 12px}
.cv-at { padding-top: 4px; font-size: 15.5px; line-height: 1.7; color: #e5e5ea}
.cv-at b { font-weight: 600; color: #ffffff}
.cv-acts { display: flex; gap: 2px; margin-block: 8px 0; margin-inline: -8px 0}
.cv-acts button { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: #98989d}
.cv-acts button:hover { background: #161617; color: #e5e5ea}
.cv-acts button.on { color: var(--accent)}

.cv-dock { flex: none; padding: 0 24px 14px}
.cv-box { width: 720px; max-width: 100%; margin: 0 auto; padding-block: 12px 10px; padding-inline: 18px 12px; border-radius: 26px; border: 1px solid #2c2c2e; background: #161617; box-shadow: none; transition: border-color .15s}
.cv-box:focus-within { border-color: #424245}
.cv-box textarea { display: block; width: 100%; min-height: 30px; max-height: 168px; padding: 4px 0; resize: none; overflow-y: auto; background: none; border: 0; outline: 0; font: inherit; font-size: 16px; line-height: 1.5; color: var(--text)}
.cv-box textarea::placeholder { color: #98989d}
.cv-tools { display: flex; align-items: center; gap: 6px; margin-block: 8px 0; margin-inline: -8px 0}
.cv-ib { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #c7c7cc}
.cv-ib:hover { background: #232325; color: #ffffff}
.cv-chip { display: flex; align-items: center; gap: 7px; height: 34px; padding-block: 0 0; padding-inline: 12px 10px; border-radius: 999px; border: 1px solid #2c2c2e; font-size: 13.5px; color: #d2d2d7}
.cv-chip .ico:first-child { color: var(--accent)}
.cv-chip .ico:last-child { color: #98989d}
.cv-chip:hover { border-color: var(--accent-line)}
.cv-send { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #2c2c2e; color: #7c7c80; transition: background .15s, color .15s}
.cv-box.has .cv-send { background: var(--accent); color: #0a0a0b}
.cv-note { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: #86868b}

/* a new chat: greeting, composer and suggestions in the middle of the page */
.cv-empty { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 24px 80px}
.cv-hero { width: 84px; height: 84px; margin-bottom: 16px; border-radius: 50%; object-fit: cover}
.cv-empty h2 { margin: 0; font-size: 32px; font-weight: 600; letter-spacing: -.01em; text-align: center; color: #f5f5f7}
.cv-empty > p { margin: 10px 0 26px; font-size: 15.5px; color: #a1a1a6; text-align: center}
.cv-empty > p b { color: #e5e5ea; font-weight: 600}
.cv-sugg { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 720px; max-width: 100%; margin-top: 16px}
.cv-sugg button { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid #232325; font-size: 14px; color: #d2d2d7}
.cv-sugg button .ico { color: var(--accent)}
.cv-sugg button:hover { border-color: var(--accent-line); background: #161617}
.cv-empty .cv-note { margin-top: 22px}

/* support mode menu: a name and a short line under it */
.dd-menu .cv-mi { justify-content: space-between; padding: 9px 12px}
.dd-menu .cv-mi b { display: block; font-size: 15px; font-weight: 600; color: var(--text)}
.dd-menu .cv-mi small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted)}
.dd-menu .cv-mi.on b { color: var(--accent)}

/* V6-49 · Wahaj Mentor: quick quiz, Simpler / More detail / Example, saved answers, what Mentor remembers */
.qz { width: 100%; max-width: 560px; border: 1px solid var(--line-2); border-radius: 16px; padding: 16px 18px; background: var(--panel)}
.qz-h { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2)}
.qz-h .ico { color: var(--accent)}
.qz-h b { color: var(--text); font-weight: 600}
.qz-h span { margin-inline-start: auto}
.qz-q { margin: 12px 0; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--text)}
.qz-opts { display: grid; gap: 8px}
.qz-o { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line-2); text-align: start; font-size: 14.5px; line-height: 1.35; color: var(--text)}
.qz-o:hover:not([disabled]) { border-color: var(--accent)}
.qz-o[disabled] { cursor: default}
.qz-o > span:nth-child(2) { flex: 1}
.qz-l { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--line-2); font-size: 12px; font-weight: 700; color: var(--text-2)}
.qz-o.right { border-color: var(--accent)}
.qz-o.right .qz-l { background: var(--accent); border-color: var(--accent); color: #000}
.qz-o.right .ico { flex: none; color: var(--accent)}
.qz-o.wrong { border-color: var(--red)}
.qz-o.wrong .qz-l, .qz-o.wrong .ico { flex: none; border-color: var(--red); color: var(--red)}
.qz-why { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-2)}
.qz-why b { color: var(--text)}
.qz-next { margin-top: 12px; height: 40px; gap: 8px}
.qz-score { margin: 10px 0 2px; font-size: 30px; font-weight: 700; color: var(--text)}
.qz-sum { margin: 0 0 12px; font-size: 14.5px; color: var(--text-2)}
.qz-rev { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px}
.qz-end .btn { height: 38px; gap: 8px}
.qz-rev button, .cv-rw button, .mm-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2)}
.qz-rev button:hover, .cv-rw button:hover, .mm-chip:hover { border-color: var(--accent); color: var(--text)}
.qz-rev .ico { color: var(--accent)}
.cv-rw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px}
.kb-a p { margin: 0 0 8px}
.kb-a p:last-child { margin-bottom: 0}
.cv-col > .flash .cv-at { outline: 1px solid var(--accent); outline-offset: 6px; border-radius: 8px}
.mh-sv .mh-ri { color: var(--accent)}
.mm h5 { margin: 4px 0 8px; font-size: 13px; font-weight: 600; color: var(--text-2)}
.mm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px}
.mm-none { margin: 0 0 16px; font-size: 14px; color: var(--text-2)}
