/* Smart21 Courses — styles. "Smart21Store" look: deep green-black surfaces, gold accents, Poppins headings, pill controls. */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/poppins-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/poppins-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/poppins-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/poppins-latin-800-normal.woff2') format('woff2'); }
:root {
  --bg: #f3f7f4; --panel: #ffffff; --side: #eaf2ed; --text: #14201a; --soft: #5b6962; --line: #d9e4dd;
  --hover: rgba(11,110,79,.08); --brand: #0B6E4F; --brand-2: #9a6b00; --on-brand: #fff; --warn: #c77700; --err: #d33b4a;
  --gold: #ffd166; --gold-ink: #1d1600; --green-deep: #0a684b;
  --code-bg: #0d1512; --code-bar: #16231d; --shadow: 0 10px 40px rgba(16,40,28,.12);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; --display: 'Poppins', var(--font);
  --canvas: #eef4f0; --grid: #c6d4cc; --lead: #7b8791; --part-line: #30403a; --label: #33443d;
  --mono: ui-monospace, 'Cascadia Code', Consolas, Menlo, monospace;
}
[data-theme="dark"] {
  --bg: #0f1712; --panel: #17221c; --side: #0c130f; --text: #eef3f0; --soft: #98a8a0; --line: #23302a;
  --hover: rgba(255,255,255,.06); --brand: #2fbf8a; --brand-2: #ffd166; --on-brand: #04130c; --warn: #f5b942; --err: #ff6b7a;
  --shadow: 0 14px 50px rgba(0,0,0,.55);
  --canvas: #0d1511; --grid: #2a3a33; --lead: #aab6bd; --part-line: #cdd8d2; --label: #a9b8b0;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; overflow: hidden; font-size: 14px; }
button, input, select, textarea { font-family: inherit; color: inherit; font-size: inherit; }
button { cursor: pointer; }
kbd { background: var(--hover); border: 1px solid var(--line); border-radius: 4px; padding: 0 .3rem; font-size: .8em; }
.mono { font-family: var(--mono); }
.soft { color: var(--soft); } .small { font-size: .82rem; } .grow { flex: 1; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; } ::-webkit-scrollbar-thumb:hover { background: var(--soft); background-clip: content-box; border: 2px solid transparent; }

#app { display: flex; flex-direction: column; height: 100vh; }
#views { flex: 1; min-width: 0; min-height: 0; position: relative; }
.view { position: absolute; inset: 0; display: none; }
.view.on { display: grid; }

/* buttons & inputs */
.btn, .tab { white-space: nowrap; }
#exSelect { max-width: 190px; }
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; transition: border-color .15s, transform .1s, background .15s; }
.btn:hover:not(:disabled) { border-color: var(--brand); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); } .btn.primary:hover:not(:disabled) { filter: brightness(1.06); border-color: var(--gold); }
.btn.icon { padding: .45rem; border-radius: 50%; } .btn.small { padding: .28rem .6rem; font-size: .84rem; } .btn.active { border-color: var(--brand); color: var(--brand); }
select, input[type=text], input[type=number], input[type=search], input:not([type]), input[type=password], textarea { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .42rem .7rem; outline: none; }
select:focus, input:focus, textarea:focus { border-color: var(--brand); }
select { cursor: pointer; }
#view-courses, #view-lab { grid-template-columns: 300px minmax(0, 1fr); }
.learn-list { border-right: 1px solid var(--line); background: var(--side); overflow-y: auto; padding: 1rem .8rem; }
.learn-list h2 { font-family: var(--display); font-size: 1.1rem; margin: .2rem .4rem .2rem; } .learn-list p { margin: 0 .4rem .8rem; color: var(--soft); font-size: .82rem; }
.lesson-item { display: flex; gap: .7rem; align-items: center; width: 100%; padding: .65rem .7rem; border-radius: 12px; background: none; border: 1px solid transparent; text-align: left; margin-bottom: .2rem; }
.lesson-item:hover { background: var(--hover); } .lesson-item.on { background: color-mix(in srgb, var(--brand) 14%, transparent); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.lesson-item .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.lesson-item.done .num { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.lesson-item b { display: block; font-size: .9rem; } .lesson-item small { color: var(--soft); }
.learn-body { overflow-y: auto; padding: 2rem min(6vw, 4rem); }
.lesson { max-width: 760px; margin: 0 auto; line-height: 1.7; }
.lesson h1 { font-family: var(--display); font-size: 1.9rem; margin: 0 0 .3rem; } .lesson h2 { font-family: var(--display); margin: 1.8rem 0 .4rem; font-size: 1.2rem; }
.lesson .tag { display: inline-block; background: color-mix(in srgb, var(--brand-2) 18%, transparent); color: var(--brand-2); border-radius: 999px; padding: .1rem .7rem; font-size: .78rem; font-weight: 700; margin-bottom: .6rem; }
.lesson .formula { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: .8rem 1.1rem; font-family: var(--mono); font-size: 1.05rem; margin: 1rem 0; }
.lesson .tip { background: color-mix(in srgb, var(--brand) 10%, transparent); border-radius: 12px; padding: .8rem 1rem; margin: 1rem 0; } .lesson .warnbox { background: color-mix(in srgb, var(--warn) 14%, transparent); border-radius: 12px; padding: .8rem 1rem; margin: 1rem 0; }
.lesson code { background: var(--hover); padding: .05rem .35rem; border-radius: 5px; font-family: var(--mono); font-size: .9em; }
.lesson pre { background: var(--code-bg); color: #d6e3dc; padding: 1rem; border-radius: 12px; overflow-x: auto; font-family: var(--mono); font-size: .86rem; line-height: 1.55; }
.lesson table { border-collapse: collapse; margin: 1rem 0; } .lesson th, .lesson td { border: 1px solid var(--line); padding: .35rem .8rem; text-align: left; }
.lesson .try { display: flex; align-items: center; gap: 1rem; background: linear-gradient(135deg, color-mix(in srgb, var(--brand-2) 18%, transparent), color-mix(in srgb, var(--brand) 18%, transparent)); border-radius: 16px; padding: 1rem 1.2rem; margin: 1.4rem 0; }
.lesson .try div { flex: 1; } .lesson .try b { display: block; }
.quiz { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.2rem; margin: 1.4rem 0; } .quiz .q { font-weight: 700; margin-bottom: .6rem; }
.quiz button.opt { display: block; width: 100%; text-align: left; padding: .5rem .8rem; margin: .3rem 0; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); } .quiz button.opt:hover { border-color: var(--brand); }
.quiz button.opt.right { background: color-mix(in srgb, var(--brand) 22%, transparent); border-color: var(--brand); } .quiz button.opt.wrong { background: color-mix(in srgb, var(--err) 20%, transparent); border-color: var(--err); }
.quiz .why { margin-top: .5rem; color: var(--soft); font-size: .88rem; }
.lesson-nav { display: flex; justify-content: space-between; margin-top: 2.4rem; }

/* ============ AI ============ */
.modal-back { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; background: rgba(4,10,7,.55); backdrop-filter: blur(2px); padding: 1.2rem; }
.modal { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); width: min(560px, 100%); max-height: calc(100vh - 2.4rem); display: flex; flex-direction: column; }
.modal.wide { width: min(980px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); } .modal-head h2 { margin: 0; font-size: 1.1rem; font-family: var(--display); }
.modal-body { padding: 1rem 1.1rem; overflow: auto; } .modal-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .8rem 1.1rem; border-top: 1px solid var(--line); }
.modal-body .soft, .soft { color: var(--soft); } .modal-body p { margin: .2rem 0 .8rem; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .7rem; margin: .6rem 0; }
.modal label, .lbl { display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; color: var(--soft); }
.modal input[type=text], .modal input[type=number], .modal input[type=search], .modal select { padding: .45rem .6rem; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: .92rem; }
.modal select[multiple] { width: 100%; } .modal .chk { flex-direction: row; align-items: center; gap: .5rem; color: var(--text); margin: .4rem 0; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin: 1rem 0; } .home-card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 1.2rem 1.3rem; } .home-card.wide { margin-top: 1rem; } .home-card h2 { margin: 0 0 .8rem; font-size: 1rem; font-family: var(--display); } .home-card h2 small { color: var(--soft); font-weight: 400; margin-left: .4rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#topbar { flex-shrink: 0; background: var(--bg); border-bottom: 1px solid var(--line); position: relative; z-index: 40; }
.top-inner { display: flex; align-items: center; gap: 1.1rem; height: 66px; padding: 0 1.4rem; margin: 0 auto; width: 100%; }
.brand { display: flex; align-items: center; gap: .7rem; background: none; border: 0; padding: 0; color: var(--text); font-family: var(--display); font-weight: 800; font-size: 1.32rem; letter-spacing: -.01em; white-space: nowrap; flex-shrink: 0; }
.brand .logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); margin: 4px; }
.brand em { font-style: normal; color: var(--gold); margin-left: .05em; }
[data-theme="light"] .brand em { color: #b7791f; }
.gsearch { position: relative; flex: 1; max-width: 660px; display: flex; align-items: center; }
.gsearch > .ic { position: absolute; left: 1rem; width: 17px; color: var(--soft); pointer-events: none; }
#topbar .gsearch input { width: 100%; height: 44px; border-radius: 999px; padding: 0 1rem 0 2.8rem; background: var(--panel); border: 1px solid var(--line); font-size: .95rem; }
#topbar .gsearch input::placeholder { color: var(--soft); opacity: .85; }
#topbar .gsearch input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 20%, transparent); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.pill-btn { display: inline-flex; align-items: center; gap: .45rem; height: 42px; padding: 0 1.15rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-family: var(--display); font-weight: 600; font-size: .88rem; transition: border-color .15s, transform .1s; }
.pill-btn:hover, .round-btn:hover { border-color: var(--gold); } .pill-btn:active, .round-btn:active { transform: translateY(1px); }
.round-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; padding: 0; background: var(--panel); border: 1px solid var(--line); color: var(--text); transition: border-color .15s; }
.round-btn.avatar { font-family: var(--display); font-weight: 700; font-size: .78rem; letter-spacing: .02em; }

/* search results */
.gresults { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: .4rem; z-index: 960; max-height: min(60vh, 480px); overflow-y: auto; }
.gresults[hidden] { display: none; }
.gr { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .5rem .7rem; border: 0; background: none; border-radius: 14px; text-align: left; color: var(--text); }
.gr.on, .gr:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.gr-ic { font-size: 1.25rem; width: 28px; text-align: center; } .gr-tx { flex: 1; min-width: 0; }
.gr-tx b { display: block; font-size: .9rem; font-weight: 600; } .gr-tx small { display: block; color: var(--soft); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-kind { font-size: .68rem; font-weight: 700; padding: .12rem .6rem; border-radius: 999px; background: var(--hover); color: var(--soft); text-transform: uppercase; letter-spacing: .04em; }
.gr-none { padding: .9rem 1rem; color: var(--soft); font-size: .88rem; line-height: 1.5; }

/* ---- pill navigation ---- */
#topnav { flex-shrink: 0; background: linear-gradient(90deg, var(--bg) 60%, color-mix(in srgb, var(--gold) 5%, var(--bg))); border-bottom: 1px solid transparent; }
.nav-inner { display: flex; align-items: center; gap: .55rem; padding: .85rem 1.4rem; margin: 0 auto; width: 100%; overflow-x: auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav { flex-shrink: 0; display: inline-flex; align-items: center; height: 38px; padding: 0 1.15rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-family: var(--display); font-weight: 600; font-size: .86rem; white-space: nowrap; transition: border-color .15s, background .15s, box-shadow .2s, transform .1s; }
.nav:hover { border-color: color-mix(in srgb, var(--gold) 70%, var(--line)); }
.nav:active { transform: translateY(1px); }
.nav.on { background: linear-gradient(180deg, #0c7a57, #0a684b); border-color: #0f8a62; color: #fff; box-shadow: 0 6px 20px rgba(10,104,75,.55); }
.ver { margin-left: auto; padding-left: 1rem; font-size: .72rem; color: var(--soft); white-space: nowrap; flex-shrink: 0; }

/* ---- home hero ---- */
.home-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-radius: 28px; padding: 2.3rem 2.4rem; color: #fff;
  background: radial-gradient(70% 120% at 92% -10%, rgba(210,190,95,.40), transparent 62%), repeating-linear-gradient(135deg, rgba(255,255,255,.045) 0 1px, transparent 1px 15px), linear-gradient(135deg, #0a684b 0%, #09553e 52%, #063f2d 100%);
  box-shadow: 0 24px 60px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.06); }
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.home-hero h1 { margin: 0 0 .55rem; font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.12; letter-spacing: -.015em; }
.home-hero p { margin: 0 0 1.4rem; max-width: 470px; line-height: 1.55; color: rgba(255,255,255,.92); font-size: 1.02rem; }
.home-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.home-hero .btn { font-family: var(--display); font-weight: 600; font-size: .95rem; padding: .78rem 1.6rem; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); box-shadow: 0 8px 22px rgba(255,209,102,.25); }
.btn.gold:hover:not(:disabled) { filter: brightness(1.07); border-color: var(--gold); }
.btn.ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.38); color: #fff; }
.btn.ghost:hover:not(:disabled) { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.7); }
.hero-stats { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.2rem; }
.hchip { display: inline-flex; gap: .35rem; align-items: baseline; padding: .32rem .85rem; border-radius: 999px; background: rgba(255,255,255,.17); border: 1px solid rgba(255,255,255,.26); font-size: .8rem; color: #fff; } .hchip b { font-weight: 700; }
.hero-ring { position: relative; z-index: 1; flex-shrink: 0; width: 150px; height: 150px; margin-right: 2.2rem; border-radius: 50%; border: 6px solid var(--gold); display: grid; place-items: center; background: rgba(0,0,0,.18);
  box-shadow: 0 0 0 22px rgba(255,209,102,.16), 0 14px 44px rgba(0,0,0,.4); }
.hero-ring img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; display: block; }
.home-grid { margin: 1.4rem 0 0; } .home-card.wide { margin-top: 1.1rem; }
.home-card h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.home-foot { margin: 2.6rem -1.4rem 0; padding: 1.6rem 1rem 2rem; border-top: 1px solid var(--line); text-align: center; color: var(--soft); font-size: .84rem; }
#topnav { background: radial-gradient(60% 220% at 100% 0%, color-mix(in srgb, var(--gold) 7%, transparent), transparent 70%), var(--bg); }
#topbar .gsearch input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.toolbar { gap: .4rem .6rem; padding: .4rem .8rem; }
.toolbar .btn { padding: .36rem .72rem; font-size: .84rem; } .toolbar .btn.icon { padding: .42rem; }
.toolbar select { border-radius: 999px; padding: .36rem .7rem; }
.tb-group { padding-right: .6rem; gap: .25rem; }
.send { background: var(--gold); color: var(--gold-ink); }
.rdock .rpanel:last-child .rp-body { padding-bottom: 72px; }   /* keeps the last items clear of the floating AI button */
.modes button.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }

/* AI tutor: follow-up question chips */
.aichips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .5rem 0 .2rem; }
.aichip { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: .38rem .85rem; cursor: pointer; font: inherit; font-size: .84rem; text-align: left; line-height: 1.35; }
.aichip:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--panel)); }

/* Arrow at the end of the top menu: shows the items that do not fit on a small screen */
#topnav { position: relative; }
#navMore { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); z-index: 5; width: 36px; height: 36px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; background: var(--panel); color: var(--gold); border: 1.5px solid color-mix(in srgb, var(--gold) 60%, transparent); box-shadow: -10px 0 14px 4px var(--bg); }
#navMore[hidden], #navMoreMenu[hidden] { display: none; }
#navMore[aria-expanded="true"] svg { transform: rotate(180deg); }
#navMoreMenu { position: absolute; right: 8px; top: calc(100% - 4px); z-index: 60; min-width: 170px; padding: .35rem; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
#navMoreMenu button { border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; font-size: .95rem; text-align: left; padding: .7rem .9rem; border-radius: 10px; cursor: pointer; min-height: 44px; }
#navMoreMenu button:hover, #navMoreMenu button.on { background: color-mix(in srgb, var(--brand) 16%, var(--panel)); }

/* ---------- Smart21 Courses ---------- */
.course-group { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-2); margin: 1rem .4rem .4rem; } .course-group small { text-transform: none; letter-spacing: 0; color: var(--soft); font-weight: 500; }
.course-more { margin: .5rem .5rem 0; font-size: .78rem; color: var(--soft); border: 1px dashed var(--line); border-radius: 10px; padding: .5rem .7rem; }
.catalog { max-width: 960px; margin: 0 auto; } .catalog h1 { font-family: var(--display); font-size: 2.1rem; margin: .2rem 0 .4rem; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.course-card { display: flex; flex-direction: column; gap: .4rem; text-align: left; padding: 1.2rem; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); color: inherit; }
.course-card .ci { font-size: 2rem; } .course-card b { font-family: var(--display); font-size: 1.15rem; } .course-card .cprog { font-size: .78rem; color: var(--soft); margin-top: auto; padding-top: .5rem; }
.course-card.ready { border-color: color-mix(in srgb, var(--brand) 55%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 14%, var(--panel)), var(--panel)); cursor: pointer; } .course-card.ready:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.course-card.soon { opacity: .55; border-style: dashed; }
.objectives { background: color-mix(in srgb, var(--brand) 9%, transparent); border-left: 4px solid var(--brand); border-radius: 12px; padding: .8rem 1.1rem; margin: 1rem 0; } .objectives ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.toc { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 .5rem; } .toc a { font-size: .8rem; padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--line); color: inherit; text-decoration: none; background: var(--panel); } .toc a:hover { border-color: var(--brand); }
.topic table { width: 100%; border-collapse: collapse; margin: .8rem 0; font-size: .88rem; display: block; overflow-x: auto; } .topic th, .topic td { border: 1px solid var(--line); padding: .4rem .6rem; text-align: left; vertical-align: top; } .topic th { background: var(--panel); }
.topic .try { flex-wrap: wrap; } .topic .try div { min-width: 200px; }
.summary li { margin: .3rem 0; } details.exercise { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .9rem; margin: .5rem 0; background: var(--panel); } details.exercise summary { cursor: pointer; font-weight: 600; } details.exercise .ans { margin-top: .5rem; color: var(--soft); border-top: 1px dashed var(--line); padding-top: .5rem; }
.cw { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; margin: 1.2rem 0; } .cw > h3 { font-family: var(--display); margin: 0 0 .2rem; font-size: 1rem; } .cw > .cw-sub { color: var(--soft); font-size: .82rem; margin: 0 0 .7rem; }
.cw-canvas { display: block; width: 100%; border-radius: 12px; background: var(--code-bg); }
.cw-row { display: grid; grid-template-columns: 150px 1fr 90px; gap: .6rem; align-items: center; margin: .35rem 0; font-size: .85rem; } .cw-row output { font-family: var(--mono, monospace); text-align: right; font-weight: 700; color: var(--brand); } .cw-row input[type=range] { width: 100%; accent-color: var(--brand); }
.cw-read { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 0; } .cw-read span { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .3rem .7rem; font-size: .85rem; } .cw-read b { color: var(--brand); }
.cw-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; } .cw select, .cw input[type=number], .cw input[type=text] { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .3rem .5rem; font: inherit; }
.spec-bar { display: flex; height: 46px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); position: relative; } .spec-bar button { flex: 1; border: 0; color: #111; font-weight: 700; font-size: .72rem; cursor: pointer; opacity: .85; padding: 0 2px; } .spec-bar button.on { opacity: 1; outline: 3px solid var(--text); outline-offset: -3px; }
.spec-pointer { position: relative; height: 14px; } .spec-pointer i { position: absolute; top: 0; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 11px solid var(--brand-2); transform: translateX(-50%); }
.band-detail { margin-top: .7rem; border-radius: 12px; padding: .8rem 1rem; background: var(--bg); border: 1px solid var(--line); border-left-width: 6px; font-size: .88rem; line-height: 1.55; } .band-detail h4 { margin: 0 0 .3rem; font-family: var(--display); }
.meter { height: 12px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; } .meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--gold)); width: 0; transition: width .1s; }
.big-read { font-family: var(--mono, monospace); font-size: 1.6rem; font-weight: 700; color: var(--gold); background: var(--code-bg); border-radius: 12px; padding: .5rem 1rem; display: inline-block; }
@media (max-width: 700px) { .cw-row { grid-template-columns: 1fr 80px; } .cw-row span { grid-column: 1 / -1; } }

/* ---------- Smart21 Courses v2: pages, lab, practice ---------- */
.page { overflow-y: auto; padding: 1.6rem min(5vw, 3rem) 2rem; } #view-home .page { padding-top: 1.4rem; }
.catalog { max-width: 980px; margin: 0 auto; } #view-reference .catalog, #view-practice .catalog, #view-notes .catalog, #view-settings .catalog { padding-bottom: 2rem; }
.tag { display: inline-block; background: color-mix(in srgb, var(--brand-2) 18%, transparent); color: var(--brand-2); border-radius: 999px; padding: .1rem .7rem; font-size: .78rem; font-weight: 700; margin-bottom: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; } .chip { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .75rem; font-size: .82rem; } .chip.pick { cursor: pointer; }
.tabs { display: flex; gap: .4rem; margin: .6rem 0 1.2rem; flex-wrap: wrap; } .tab { padding: .4rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; } .tab.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.fgrid, .home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin: 1rem 0; } .home-cards { margin-top: 1.4rem; max-width: 1100px; }
.fcard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; margin: .7rem 0; } .fgrid .fcard, .home-cards .fcard { margin: 0; } .fcard h3 { margin: .2rem 0 .5rem; font-family: var(--display); font-size: 1.02rem; }
.fcard .formula { background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: .5rem .8rem; font-family: var(--mono); font-weight: 700; margin: .4rem 0; }
.gloss dt { font-weight: 700; margin-top: .8rem; color: var(--brand); } .gloss dd { margin: .15rem 0 0; line-height: 1.55; }
.rtable { border-collapse: collapse; width: 100%; font-size: .88rem; margin: .6rem 0; } .rtable th, .rtable td { border: 1px solid var(--line); padding: .35rem .6rem; text-align: left; } .rtable th { background: var(--panel); } .tbl-wrap { overflow-x: auto; }
.proc { padding-left: 1.2rem; } .proc li { margin: .4rem 0; } .proc label { display: flex; gap: .5rem; align-items: flex-start; cursor: pointer; }
.notebox { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; font: inherit; resize: vertical; } .ntitle { width: 100%; font-weight: 700; margin-bottom: .4rem; }
.analysis { background: color-mix(in srgb, var(--brand) 8%, transparent); border-radius: 12px; padding: .2rem 1rem; }
.qhead { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; } .quiz.big .q { font-size: 1.1rem; } .quiz button.opt.picked { border-color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 18%, transparent); }
.flash { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .6rem; width: 100%; min-height: 220px; border-radius: 20px; border: 2px solid var(--brand); background: var(--panel); text-align: center; padding: 1.5rem; margin: 1rem 0; } .flash b { font-family: var(--display); font-size: 1.35rem; } .flash.flip { background: color-mix(in srgb, var(--brand) 14%, var(--panel)); } .flash.flip b { font-size: 1.05rem; font-weight: 500; line-height: 1.6; }
.quiz button.opt.dq { display: block; width: 100%; text-align: left; padding: .45rem .8rem; margin: .3rem 0; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.opt.right { background: color-mix(in srgb, var(--brand) 22%, transparent) !important; border-color: var(--brand) !important; } .opt.wrong { background: color-mix(in srgb, var(--err) 20%, transparent) !important; border-color: var(--err) !important; }
.gres { display: block; width: 100%; text-align: left; padding: .55rem .9rem; background: none; border: 0; border-bottom: 1px solid var(--line); } .gres:hover { background: var(--hover); } .gres small { display: block; color: var(--soft); }
.home-cards .opt { display: block; width: 100%; text-align: left; padding: .45rem .8rem; margin: .3rem 0; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.mob-toggle { display: none; }
@media (max-width: 800px) {
  #view-courses, #view-lab { grid-template-columns: minmax(0, 1fr); }
  .learn-list { position: absolute; z-index: 30; top: 0; bottom: 0; left: 0; width: min(86vw, 340px); transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); }
  .view.list-open .learn-list { transform: none; }
  .mob-toggle { display: block; position: absolute; z-index: 20; top: .5rem; left: .5rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; }
  .learn-body { padding: 3.2rem 1rem 2rem; } .page { padding: 1rem; }
  .home-hero { flex-direction: column; align-items: flex-start; padding: 1.4rem; } .hero-ring { display: none; }
  .top-inner { gap: .6rem; padding: 0 .8rem; } .brand span { font-size: .95rem; } .nav-inner { padding: .6rem .8rem; } .ver { display: none; }
}
@media print { #topbar, #topnav { display: none; } }

/* icons (PNG files in img/icons) */
.ico { width: 1.25em; height: 1.25em; object-fit: contain; vertical-align: -.28em; flex-shrink: 0; user-select: none; }
.ico.h1ico { width: 1.1em; height: 1.1em; border-radius: 12px; margin-right: .2rem; }
.gsearch > .ico { position: absolute; left: 1rem; width: 18px; height: 18px; pointer-events: none; }
.round-btn .ico { width: 20px; height: 20px; }
.course-card .ci .ico { width: 52px; height: 52px; border-radius: 14px; }
.lesson-item .num .ico { width: 22px; height: 22px; } .cw > h3 .ico { width: 1.5em; height: 1.5em; border-radius: 8px; vertical-align: -.45em; margin-right: .3rem; }
.topic h2 .ico { width: 1.5em; height: 1.5em; border-radius: 8px; vertical-align: -.4em; margin-right: .3rem; }
.fcard h3 .ico { width: 1.4em; height: 1.4em; border-radius: 8px; vertical-align: -.4em; } .hchip .ico { width: 1.1em; height: 1.1em; }
.btn .ico, .tab .ico, .mob-toggle .ico { width: 1.1em; height: 1.1em; } .cw-read .ico, .band-detail .ico { width: 1.2em; height: 1.2em; }

/* ---------- AI tutor (floating Ask AI) ---------- */
.thread { max-width: 780px; margin: 0 auto; padding: 1rem 0 2rem; display: flex; flex-direction: column; gap: 1.2rem; }
.msg { display: flex; gap: .8rem; } .msg.user { justify-content: flex-end; }
.msg .av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.bubble { line-height: 1.65; min-width: 0; max-width: 100%; } .msg.user .bubble { background: color-mix(in srgb, var(--brand) 16%, var(--panel)); padding: .6rem 1rem; border-radius: 18px 18px 4px 18px; max-width: 80%; white-space: pre-wrap; }
.bubble h3, .bubble h4, .bubble h5 { font-family: var(--display); font-size: 1.1rem; margin: .2rem 0 .4rem; }
.bubble p { margin: .3rem 0 .6rem; } .bubble pre { background: var(--code-bg); color: #d6e3dc; padding: .8rem 1rem; border-radius: 12px; overflow-x: auto; font-family: var(--mono); font-size: .85rem; position: relative; } .bubble code { background: var(--hover); padding: .05rem .35rem; border-radius: 5px; font-family: var(--mono); font-size: .9em; } .bubble pre code { background: none; padding: 0; }
.bubble table { border-collapse: collapse; margin: .5rem 0; } .bubble th, .bubble td { border: 1px solid var(--line); padding: .3rem .7rem; } .bubble ul, .bubble ol { margin: .3rem 0 .6rem 1.2rem; padding: 0; }
.bubble .copy, .bubble .loadcode { position: absolute; top: 6px; right: 6px; font-size: .72rem; padding: .15rem .5rem; border-radius: 6px; background: #ffffff18; color: #cfe; border: 1px solid #ffffff22; } .bubble .loadcode { right: 60px; }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--soft); margin-right: 4px; animation: blink 1.2s infinite; } .typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.aichips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .5rem 0 .2rem; }
.aichip { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: .38rem .85rem; cursor: pointer; font: inherit; font-size: .84rem; text-align: left; line-height: 1.35; }
.aichip:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--panel)); }
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 800; display: flex; flex-direction: column; align-items: flex-end; gap: .8rem; pointer-events: none; }
.ai-fab > * { pointer-events: auto; }
.ai-fab[hidden] { display: none; }
.fab-btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; height: 56px; min-width: 56px; padding: 0 1.3rem 0 1.1rem; border: 0; border-radius: 999px; background: linear-gradient(135deg, #ffe08a, #ffd166 55%, #f5b942); color: var(--gold-ink); font-family: var(--display); font-weight: 700; font-size: .95rem;
  box-shadow: 0 12px 32px rgba(0,0,0,.45), 0 0 0 5px rgba(255,209,102,.16); transition: transform .15s, box-shadow .2s; animation: fabPulse 2.4s ease-out 1.2s 3; }
.fab-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0,0,0,.5), 0 0 0 7px rgba(255,209,102,.22); }
.fab-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.fab-btn .ic { width: 23px; height: 23px; stroke-width: 2; }
.fab-ic-close { display: none; }
.fab-logo { width: 40px; height: 40px; border-radius: 50%; display: block; flex: none; box-shadow: 0 0 0 2px rgba(0,0,0,.18); }
.fab-btn:has(.fab-logo) { padding: 0 1.2rem 0 .7rem; }
.ai-fab[data-open="1"] .fab-btn { padding: 0; width: 56px; animation: none; }
.ai-fab[data-open="1"] .fab-logo, .ai-fab[data-open="1"] .fab-label { display: none; } .ai-fab[data-open="1"] .fab-ic-close { display: block; }
body[data-view="lab"] .fab-label { display: none; } body[data-view="lab"] .ai-fab:not([data-open="1"]) .fab-btn { padding: 0; width: 54px; height: 54px; }
@keyframes fabPulse { 0% { box-shadow: 0 12px 32px rgba(0,0,0,.45), 0 0 0 5px rgba(255,209,102,.16), 0 0 0 0 rgba(255,209,102,.55); } 100% { box-shadow: 0 12px 32px rgba(0,0,0,.45), 0 0 0 5px rgba(255,209,102,.16), 0 0 0 22px rgba(255,209,102,0); } }
@media (prefers-reduced-motion: reduce) { .fab-btn, .fab-panel { animation: none !important; transition: none; } }

.fab-panel { width: 390px; max-width: calc(100vw - 28px); height: min(580px, calc(100vh - 150px)); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 24px 70px rgba(0,0,0,.55); overflow: hidden; transform-origin: bottom right; animation: fabIn .2s ease both; }
.fab-panel[hidden] { display: none; }
@keyframes fabIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.fab-head { display: flex; align-items: center; gap: .65rem; padding: .85rem .9rem; color: #fff; flex-shrink: 0;
  background: radial-gradient(90% 160% at 100% -30%, rgba(210,190,95,.35), transparent 60%), repeating-linear-gradient(135deg, rgba(255,255,255,.045) 0 1px, transparent 1px 15px), linear-gradient(135deg, #0a684b, #063f2d); }
.fab-av { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #0a684b, 0 0 0 4px var(--gold); margin: 3px; flex-shrink: 0; }
.fab-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; } .fab-title b { font-family: var(--display); font-weight: 700; font-size: 1rem; }
.fab-title small { font-size: .72rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fab-ib { width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; flex-shrink: 0; } .fab-ib:hover { background: rgba(255,255,255,.26); } .fab-ib .ic { width: 16px; height: 16px; }
.fab-stage { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem .95rem; background: var(--bg); scroll-behavior: smooth; }
.fab-welcome h3 { margin: .2rem 0 .3rem; font-size: 1.2rem; font-weight: 700; line-height: 1.25; } .fab-welcome p { margin: 0 0 .9rem; color: var(--soft); font-size: .88rem; line-height: 1.5; }
.fab-chips { display: flex; flex-direction: column; gap: .45rem; align-items: flex-start; }
.fab-chip { padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: .84rem; font-weight: 600; text-align: left; transition: border-color .15s, background .15s; } .fab-chip:hover { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--panel)); }
.fab-thread.thread { max-width: none; margin: 0; padding: 0; gap: .95rem; }
.fab-thread .msg { gap: .55rem; } .fab-thread .msg .av { width: 28px; height: 28px; } .fab-thread .bubble { font-size: .9rem; line-height: 1.55; }
.fab-thread .msg.user .bubble { background: var(--gold); color: var(--gold-ink); border-radius: 18px 18px 4px 18px; max-width: 86%; font-weight: 500; }
.fab-thread .bubble h3, .fab-thread .bubble h4, .fab-thread .bubble h5 { font-size: 1rem; }
.fab-thread .bubble pre { font-size: .78rem; padding: .65rem .8rem; } .fab-thread .bubble table { display: block; overflow-x: auto; max-width: 100%; }
.fab-foot { padding: .55rem .8rem .8rem; border-top: 1px solid var(--line); background: var(--panel); flex-shrink: 0; }
.fab-ctx { display: flex; align-items: center; gap: .45rem; font-size: .74rem; color: var(--soft); margin: 0 0 .45rem .3rem; }
.fab-form { display: flex; align-items: flex-end; gap: .4rem; background: var(--bg); border: 1px solid var(--line); border-radius: 22px; padding: .3rem .35rem .3rem .9rem; } .fab-form:focus-within { border-color: var(--gold); }
.fab-form textarea { flex: 1; border: 0; background: transparent; resize: none; max-height: 110px; padding: .45rem 0; font-size: .9rem; }
.fab-form .send { background: var(--gold); color: var(--gold-ink); flex-shrink: 0; width: 36px; height: 36px; }
@media (max-width: 520px) { .ai-fab { right: 14px; bottom: 14px; } .fab-panel { height: min(580px, calc(100vh - 120px)); } }
.fab-ib img { width: 16px; height: 16px; } .fab-form .send { padding: 0; } .fab-form .send img { width: 18px; height: 18px; } .fab-btn { color: var(--gold-ink); } .fab-welcome .grad { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fab-chip .ico { width: 1.3em; height: 1.3em; border-radius: 6px; } .fab-thread .aichips { margin-left: 2.1rem; }
@media print { .ai-fab { display: none !important; } }
/* ---------- home (ElectroLab-style) ---------- */
#view-home { overflow: auto; } .home { max-width: 1120px; margin: 0 auto; padding: 1.4rem 1.4rem 0; width: 100%; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin: 1.4rem 0 0; }
.home-card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 1.2rem 1.3rem; } .home-card.wide { margin-top: 1.1rem; } .home-card h2 { margin: 0 0 .8rem; font-size: 1.15rem; font-family: var(--display); } .home-card h2 small { color: var(--soft); font-weight: 400; margin-left: .4rem; }
.rings { display: flex; flex-direction: column; gap: .8rem; } .ringrow { display: flex; align-items: center; gap: .9rem; } .ringrow b { display: block; } .ringrow span { color: var(--soft); font-size: .85rem; }
.pring { --p: 0; --c: var(--brand); position: relative; width: 66px; height: 66px; border-radius: 50%; flex-shrink: 0; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; }
.pring::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--panel); } .pring i { position: relative; font-style: normal; font-weight: 700; font-size: .85rem; }
.next-item { display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 12px; padding: .6rem .8rem; margin-bottom: .55rem; font: inherit; } .next-item:hover { border-color: var(--brand); } .next-item small { display: block; color: var(--soft); } .next-item > span:nth-child(2) { flex: 1; min-width: 0; } .next-item .ni-ic .ico { width: 30px; height: 30px; border-radius: 9px; } .next-item .go .ico { width: 18px; height: 18px; }
.req { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px dashed var(--line); font-size: .9rem; } .req.ok { color: var(--brand); } .req .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--soft); margin-right: .5rem; vertical-align: -1px; } .req.ok .dot { background: var(--brand); border-color: var(--brand); }
.cert-card .btn { margin-top: .9rem; width: 100%; justify-content: center; } .cert-card.ready { border-color: #c9a24a; background: linear-gradient(160deg, var(--panel), #c9a24a14); } .cert-note { text-align: center; color: var(--soft); font-weight: 600; margin-top: .8rem; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .7rem; } .ach { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; display: flex; flex-direction: column; gap: .15rem; opacity: .65; background: var(--bg); } .ach.on { opacity: 1; border-color: var(--warn); background: linear-gradient(160deg, var(--bg), #f5b94212); } .ach .ach-ic .ico { width: 34px; height: 34px; border-radius: 10px; } .ach:not(.on) .ach-ic .ico { filter: grayscale(1); opacity: .6; } .ach small { color: var(--soft); } .ach .bar { height: 5px; border-radius: 3px; background: var(--line); margin-top: .35rem; overflow: hidden; } .ach .bar i { display: block; height: 100%; background: var(--brand); } .ach em { font-style: normal; font-size: .72rem; color: var(--soft); }
.dq-card .opt { display: block; width: 100%; text-align: left; padding: .45rem .8rem; margin: .3rem 0; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
@media (max-width: 800px) { .home { padding: 1rem; } .home-hero { padding: 1.4rem; } }
@media (max-width: 640px) { #topPractice { display: none; } }
/* centred column, like ElectroLab */
body[data-view="home"] .top-inner, body[data-view="home"] .nav-inner { max-width: 1100px; }
#view-home .page { max-width: 1100px; width: 100%; margin: 0 auto; box-sizing: border-box; padding: 1.4rem 1.4rem 0; justify-self: center; }
.home-foot { margin: 2.6rem -1.4rem 0; }
/* full-page AI tutor */
#view-tutor { grid-template-columns: 270px minmax(0, 1fr); } #tutorBody { display: contents; } body[data-view="tutor"] .ai-fab { display: none; }
.tp-side { border-right: 1px solid var(--line); padding: .9rem; display: flex; flex-direction: column; gap: .7rem; min-height: 0; background: color-mix(in srgb, var(--bg) 92%, #000); }
.tp-new { justify-content: flex-start; width: 100%; } .tp-new .ico { width: 16px; height: 16px; } .tp-side input[type=search] { width: 100%; border-radius: 10px; padding: .55rem .8rem; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.tp-list { flex: 1; overflow-y: auto; min-height: 0; } .tp-chat { display: flex; align-items: center; border-radius: 10px; } .tp-chat:hover, .tp-chat.on { background: var(--panel); } .tp-chat.on { box-shadow: inset 3px 0 var(--gold); }
.tp-open { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: var(--text); padding: .55rem .7rem; font: inherit; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-del { background: none; border: 0; opacity: 0; padding: .4rem; } .tp-chat:hover .tp-del { opacity: .7; } .tp-del .ico { width: 14px; height: 14px; } .tp-clear { background: none; border: 0; color: var(--soft); text-align: left; padding: .5rem .3rem; font: inherit; font-size: .88rem; }
.tp-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tp-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 1.1rem; flex-wrap: wrap; } .tp-engine { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .9rem; background: var(--panel); font-size: .88rem; font-weight: 600; } .tp-engine .ico { width: 16px; height: 16px; } .tp-ctx { font-size: .85rem; color: var(--soft); display: flex; align-items: center; gap: .4rem; }
.tp-stage { flex: 1; overflow-y: auto; min-height: 0; padding: 0 1.2rem; } .tp-stage .thread { padding-top: .5rem; }
.tp-welcome { max-width: 800px; margin: 1.6rem auto 0; text-align: center; } .tp-welcome[hidden] { display: none; } .tp-welcome > img { width: 84px; height: 84px; border-radius: 50%; box-shadow: 0 0 0 3px var(--gold), 0 0 40px color-mix(in srgb, var(--gold) 25%, transparent); }
.tp-welcome h1 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.12; margin: 1.2rem 0 .6rem; } .tp-welcome .grad { background: linear-gradient(90deg, var(--gold), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tp-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: 1.6rem; text-align: left; }
.tp-card { display: flex; align-items: center; gap: .9rem; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; color: var(--text); font: inherit; } .tp-card:hover { border-color: var(--brand); } .tp-card b { display: block; } .tp-card small { color: var(--soft); } .tp-card .ti .ico { width: 38px; height: 38px; border-radius: 11px; }
.tp-foot { max-width: 820px; width: 100%; margin: 0 auto; padding: .6rem 1.2rem .7rem; box-sizing: border-box; } .tp-modes { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: .6rem; }
.tp-mode { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: .3rem .85rem; font: inherit; font-size: .82rem; } .tp-mode.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 700; }
.tp-form { display: flex; align-items: flex-end; gap: .5rem; border: 1px solid var(--brand); border-radius: 22px; background: var(--panel); padding: .45rem .5rem .45rem 1rem; } .tp-form textarea { flex: 1; resize: none; border: 0; background: transparent; color: var(--text); font: inherit; max-height: 140px; outline: none; padding: .5rem 0; }
.tp-form .send { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--gold); display: grid; place-items: center; padding: 0; } .tp-form .send:disabled { opacity: .45; } .tp-form .send img { width: 18px; height: 18px; } .tp-note { text-align: center; margin: .45rem 0 0; }
@media (max-width: 800px) { #view-tutor { grid-template-columns: minmax(0, 1fr); } .tp-side { display: none; } .tp-cards { grid-template-columns: 1fr; } }
.tp-card, .tp-card > span:last-child { text-align: left; }
.cw-meter { height: 10px; border-radius: 6px; background: var(--line); margin: .6rem 0 .4rem; overflow: hidden; } .cw-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--gold), #e5484d); transition: width .12s; }
