/* ==========================================================================
   Mentora shell: sign-in, sidebar, dashboard, topics, progress, tutor
   ========================================================================== */
.st-brand { display: flex; align-items: center; gap: 10px; }
.st-logo { width: 38px; height: 38px; border-radius: 9px; background: var(--violet); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; letter-spacing: .04em; flex-shrink: 0; }
.st-brand strong { display: block; font-family: var(--font-display); font-size: 1.08rem; line-height: 1.15; color: var(--ink); }
.st-brand small { display: block; font-size: .74rem; color: var(--muted); font-weight: 500; }
.st-brand-lg .st-logo { width: 46px; height: 46px; font-size: .9rem; }
.st-brand-lg strong { font-size: 1.3rem; }
.st-label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin: 14px 0 6px; }
.st-note { margin-top: 18px; color: var(--muted); font-size: .88rem; max-width: 760px; }

/* icons (inline SVG masks, no emoji) */
.st-ic { width: 18px; height: 18px; display: inline-block; flex-shrink: 0; background: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.st-ic[data-icon="home"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5V21H3z'/%3E%3Cpath d='M9 21v-6h6v6'/%3E%3C/svg%3E"); }
.st-ic[data-icon="book"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4.5A2.5 2.5 0 0 1 6.5 2H20v17H6.5A2.5 2.5 0 0 0 4 21.5z'/%3E%3Cpath d='M4 21.5V4.5'/%3E%3C/svg%3E"); }
.st-ic[data-icon="paper"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.st-ic[data-icon="clock"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.st-ic[data-icon="chart"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); }
.st-ic[data-icon="users"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M2 21a7 7 0 0 1 14 0M16 3.5a4 4 0 0 1 0 8M22 21a7 7 0 0 0-4-6.3'/%3E%3C/svg%3E"); }
.st-ic[data-icon="check"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17 19 7'/%3E%3C/svg%3E"); }
.st-ic[data-icon="play"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l13-7.5z'/%3E%3C/svg%3E"); }
.st-ic[data-icon="file"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3C/svg%3E"); }
.st-ic[data-icon="link"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E"); }
.st-ic[data-icon="chev"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E"); }

/* ---------- sign in (see "sign in & first-sign-in profile" at the end) */
.login-sub { color: var(--muted); margin-top: 6px; font-size: .92rem; }
.login-card .text-input { width: 100%; font-size: 1rem; padding: 11px 13px; }
.login-btn { width: 100%; margin-top: 22px; }
.login-error { margin-top: 12px; color: var(--coral); background: var(--coral-soft); border-radius: var(--r-sm); padding: 8px 10px; font-size: .88rem; font-weight: 500; }
.login-foot { margin-top: 16px; font-size: .8rem; color: var(--muted); text-align: center; }

/* ---------- studio layout */
.studio { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.st-side { position: sticky; top: 0; height: 100vh; height: 100dvh; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; gap: 22px; z-index: 30; }
.st-side .st-brand { padding: 0 6px; }
.st-nav { display: grid; gap: 2px; }
.st-nav button { display: flex; align-items: center; gap: 11px; border: none; background: none; cursor: pointer; font: inherit; font-size: .93rem; font-weight: 500; color: var(--ink-soft); padding: 10px 12px; border-radius: var(--r-md); text-align: left; }
.st-nav button:hover { background: #f3f5f8; color: var(--ink); }
.st-nav button.is-active { background: var(--violet-soft); color: var(--violet); font-weight: 600; }
.st-user { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 6px 0; display: grid; gap: 10px; }
.st-who { display: flex; align-items: center; gap: 10px; }
.st-initials { width: 36px; height: 36px; border-radius: 50%; background: var(--violet-soft); color: var(--violet); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.st-who strong { display: block; font-size: .92rem; font-weight: 600; }
.st-who small { display: block; color: var(--muted); font-size: .76rem; }
.st-user-actions { display: flex; gap: 6px; }
.st-user-actions button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm); padding: 6px; font: inherit; font-size: .8rem; color: var(--ink-soft); cursor: pointer; }
.st-user-actions button:hover { background: #f3f5f8; }

.st-main { min-width: 0; padding: 0 32px 48px; }
.st-top { display: flex; align-items: center; gap: 14px; padding: 26px 0 20px; }
.st-heading { flex: 1; min-width: 0; }
.st-crumb { font-size: .8rem; color: var(--muted); font-weight: 500; display: flex; gap: 6px; flex-wrap: wrap; }
.st-crumb button { border: none; background: none; padding: 0; font: inherit; color: var(--sea); cursor: pointer; }
.st-crumb button:hover { text-decoration: underline; }
.st-top h1 { font-size: 1.75rem; margin-top: 2px; }
.st-top-actions { display: flex; gap: 8px; }
.st-menu { display: none; width: 40px; height: 40px; border: 1px solid var(--line); background: #fff; border-radius: var(--r-md); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.st-menu span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.st-view { animation: screenFade .2s ease; max-width: 1180px; }

/* ---------- cards & common */
.st-grid { display: grid; gap: 16px; }
.st-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.st-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.st-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.st-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); min-width: 0; }
.st-card h2 { font-size: 1.15rem; margin-bottom: 4px; }
.st-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.st-card-head p { color: var(--muted); font-size: .85rem; }
.st-section { margin-top: 24px; }
.st-stat { padding: 16px 18px; }
.st-stat-label { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.st-stat-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1.15; margin-top: 4px; }
.st-stat-sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.st-empty { color: var(--muted); font-size: .9rem; padding: 14px 0 4px; }
.st-pill { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: #eef1f5; color: var(--ink-soft); white-space: nowrap; }
.st-pill.is-maths { background: var(--maths-soft); color: var(--maths); }
.st-pill.is-english, .st-pill.is-englit { background: var(--english-soft); color: var(--english); }
.st-pill.is-science { background: #e5f2ea; color: #1f5a3a; }
.st-pill.is-pshe { background: #f6ebf0; color: #7a2f52; }
.st-pill.is-done { background: var(--go-soft); color: var(--go-deep); }
.st-pill.is-due { background: var(--sun-soft); color: #8a5a12; }
.st-pill.is-late { background: var(--coral-soft); color: var(--coral); }
.st-bar { height: 6px; border-radius: 99px; background: #e8ecf2; overflow: hidden; }
.st-bar > span { display: block; height: 100%; background: var(--go); border-radius: 99px; transition: width .4s; }
.st-list { list-style: none; display: grid; }
.st-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid #edf0f4; }
.st-row:first-child { border-top: none; }
.st-row-main { flex: 1; min-width: 0; }
.st-row-main strong { display: block; font-weight: 600; font-size: .94rem; }
.st-row-main small { display: block; color: var(--muted); font-size: .8rem; margin-top: 1px; }
.st-row .btn { flex-shrink: 0; }
.st-score { font-weight: 600; font-variant-numeric: tabular-nums; }
.st-tabs { display: inline-flex; background: #e9edf2; border-radius: var(--r-md); padding: 3px; gap: 2px; }
.st-tabs button { border: none; background: none; font: inherit; font-size: .88rem; font-weight: 500; padding: 7px 14px; border-radius: 8px; cursor: pointer; color: var(--ink-soft); }
.st-tabs button.is-active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.st-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }

/* dashboard */
.dash-hello { margin-bottom: 20px; }
.dash-hello p { color: var(--muted); }
.dash-subject { display: flex; flex-direction: column; gap: 10px; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.dash-subject:hover { border-color: #c4cfdd; box-shadow: var(--shadow-md); }
.dash-subject h3 { font-size: 1.1rem; }
.dash-subject .dsub-next { font-size: .85rem; color: var(--ink-soft); }
.dash-subject .dsub-meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }

/* ---------- topics browser */
.tp-terms { display: grid; gap: 28px; }
.tp-term h2 { font-size: 1.25rem; display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.tp-term h2 small { font-family: var(--font-body); font-size: .8rem; color: var(--muted); font-weight: 500; }
.tp-topics { display: grid; gap: 10px; }
.tp-topic { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tp-topic > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) 150px 22px; align-items: center; gap: 16px; padding: 16px 18px; cursor: pointer; }
.tp-topic > summary::-webkit-details-marker { display: none; }
.tp-topic > summary:hover { background: #fafbfc; }
.tp-topic-title strong { display: block; font-weight: 600; font-size: 1rem; }
.tp-topic-title small { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.tp-topic-prog { display: grid; gap: 5px; font-size: .76rem; color: var(--muted); text-align: right; }
.tp-topic .st-ic[data-icon="chev"] { color: var(--muted); transition: transform .2s; }
.tp-topic[open] > summary .st-ic[data-icon="chev"] { transform: rotate(90deg); }
.tp-subs { list-style: none; border-top: 1px solid var(--line); background: #fbfcfd; }
.tp-sub { display: flex; align-items: center; gap: 12px; width: 100%; border: none; background: none; font: inherit; text-align: left; padding: 12px 18px 12px 22px; cursor: pointer; border-top: 1px solid #eef1f5; color: inherit; }
.tp-subs li:first-child .tp-sub { border-top: none; }
.tp-sub:hover { background: #f1f5fa; }
.tp-sub-state { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c9d2de; flex-shrink: 0; display: grid; place-items: center; color: #fff; }
.tp-sub-state.is-started { border-color: var(--sun); background: linear-gradient(90deg, var(--sun) 50%, transparent 50%); }
.tp-sub-state.is-secure { border-color: var(--go); background: var(--go); }
.tp-sub-state .st-ic { width: 12px; height: 12px; }
.tp-sub-main { flex: 1; min-width: 0; }
.tp-sub-main strong { display: block; font-weight: 600; font-size: .93rem; }
.tp-sub-main small { display: block; color: var(--muted); font-size: .8rem; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-sub-tags { display: flex; gap: 6px; flex-shrink: 0; }
.tp-missing { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- subtopic page */
.sub-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.sub-objectives { list-style: none; display: grid; gap: 8px; }
.sub-objectives li { position: relative; padding-left: 22px; line-height: 1.5; }
.sub-objectives li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--violet); }
.sub-nc { margin-top: 14px; padding: 12px 14px; background: #f6f8fb; border-left: 3px solid #c9d2de; border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .86rem; color: var(--ink-soft); }
.sub-nc b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.sub-actions { display: grid; gap: 10px; }
.sub-action { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: var(--r-md); padding: 14px 16px; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, background .15s; }
.sub-action:hover { border-color: var(--violet); background: #fafbfd; }
.sub-action:disabled { cursor: default; opacity: .55; }
.sub-action:disabled:hover { border-color: var(--line); background: #fff; }
.sub-action .sa-ic { width: 38px; height: 38px; border-radius: var(--r-md); background: var(--violet-soft); color: var(--violet); display: grid; place-items: center; flex-shrink: 0; }
.sub-action .sa-main { flex: 1; min-width: 0; }
.sub-action strong { display: block; font-weight: 600; }
.sub-action small { display: block; color: var(--muted); font-size: .82rem; margin-top: 1px; }
.sub-learn { line-height: 1.7; font-size: 1rem; }
.sub-learn h3 { font-size: 1.12rem; margin: 22px 0 8px; }
.sub-learn p { margin-bottom: 12px; }
.sub-learn .frac { font-size: .95em; }
.sub-example { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin: 12px 0; background: #fbfcfd; }
.sub-example .se-q { font-weight: 600; }
.sub-example ol { margin: 8px 0 6px 20px; }
.sub-example .se-a { color: var(--go-deep); font-weight: 600; }
.sub-vocab { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sub-res { list-style: none; display: grid; gap: 2px; }
.sub-res a { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: .88rem; }
.sub-res a:hover { background: #f3f5f8; }
.sub-res a .st-ic { color: var(--muted); }
.sub-res small { color: var(--muted); }
.sub-res-head { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 14px 0 4px; }
.sub-res-head:first-child { margin-top: 0; }

/* ---------- progress & daily log */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { font-size: .72rem; color: var(--muted); text-align: center; font-weight: 600; }
.cal-day { aspect-ratio: 1; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; font-size: .78rem; color: var(--ink-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; }
.cal-day small { font-size: .66rem; color: inherit; opacity: .85; }
.cal-day.l1 { background: #e6f1ea; border-color: #cfe5d7; }
.cal-day.l2 { background: #b9dcc6; border-color: #a3cfb3; color: #1f4d39; }
.cal-day.l3 { background: #5aa47b; border-color: #4e9670; color: #fff; }
.cal-day.l4 { background: #2d7a55; border-color: #22603f; color: #fff; }
.cal-day.is-sel { outline: 2px solid var(--violet); outline-offset: 1px; }
.cal-day.is-future { visibility: hidden; }
.week-bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding-top: 10px; }
.week-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: .72rem; color: var(--muted); }
.week-bar span { width: 100%; max-width: 38px; background: var(--violet); border-radius: 5px 5px 0 0; min-height: 2px; }
.week-bar b { font-weight: 600; color: var(--ink-soft); }
.log-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid #edf0f4; }
.log-item:first-child { border-top: none; }
.log-time { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.log-item strong { font-weight: 600; font-size: .92rem; display: block; }
.log-item small { color: var(--muted); font-size: .8rem; }
.cover-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 48px; gap: 12px; align-items: center; padding: 8px 0; font-size: .88rem; }

/* ---------- tutor panel */
.tt-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tt-table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tt-table td { padding: 12px 10px; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
.tt-table tbody tr { cursor: pointer; }
.tt-table tbody tr:hover { background: #f8fafc; }
.tt-name { display: flex; align-items: center; gap: 10px; }
.tt-name strong { font-weight: 600; }
.tt-wrap { overflow-x: auto; }
.tt-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.tt-form label { display: grid; gap: 5px; font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.tt-form .text-input, .tt-form select, .st-select { font: inherit; font-size: .9rem; padding: 9px 10px; border: 1px solid #cfd7e2; border-radius: var(--r-md); background: #fff; width: 100%; min-width: 0; }
.tt-assign { display: grid; gap: 12px; }
.tt-assign-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px; align-items: center; }
.tt-assign-row > span { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.tt-mini { width: 100%; height: 48px; }

/* ---------- small screens */
@media (max-width: 1080px) {
  .st-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sub-layout { grid-template-columns: 1fr; }
  .tt-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .studio { grid-template-columns: 1fr; }
  .st-side { position: fixed; left: 0; top: 0; width: 272px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .st-side.is-open { transform: none; }
  .st-scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 25; }
  .st-menu { display: flex; }
  .st-main { padding: 0 16px 40px; }
  .st-top { padding: 16px 0 14px; }
  .st-top h1 { font-size: 1.35rem; }
  .st-grid-2, .st-grid-3 { grid-template-columns: 1fr; }
  .tp-topic > summary { grid-template-columns: minmax(0, 1fr) 22px; }
  .tp-topic-prog { display: none; }
  .tp-sub-tags { display: none; }
  .tt-form { grid-template-columns: 1fr; }
  .tt-assign-row { grid-template-columns: 1fr; }
  .cover-row { grid-template-columns: 110px minmax(0, 1fr) 40px; }
}
@media (max-width: 420px) {
  .st-grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .st-stat-value { font-size: 1.5rem; }
}
.st-ic[data-icon="sound"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13'/%3E%3C/svg%3E"); }
.st-ic[data-icon="flag"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4M5 4h11l-2 4 2 4H5'/%3E%3C/svg%3E"); }
.ex-icon { filter: none; color: var(--ink-soft); display: grid; place-items: center; }
.ex-icon.is-on { color: #8a5a12; }
.ex-tl-icon { color: #b45309; display: grid; place-items: center; }

/* ==========================================================================
   Lesson view (lesson-view.js)
   ========================================================================== */
.lv-banner { --b1: #1f3a68; --b2: #2d5590; display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 20px; align-items: center;
  background: linear-gradient(120deg, var(--b1), var(--b2)); color: #fff; border-radius: var(--r-xl); padding: 26px 30px; margin-bottom: 20px; position: relative; overflow: hidden; }
.lv-banner::after { content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.06); }
.lv-fractions, .lv-number { --b1: #1f3a68; --b2: #2f5c96; }
.lv-calc, .lv-algebra { --b1: #23395b; --b2: #3c5a87; }
.lv-measure, .lv-geometry { --b1: #1d4e5a; --b2: #2f7180; }
.lv-stats { --b1: #2f3d63; --b2: #4b5c8f; }
.lv-reading, .lv-poetry { --b1: #3f2f5c; --b2: #5e4a86; }
.lv-writing, .lv-speaking { --b1: #1d5c63; --b2: #2e7d86; }
.lv-grammar, .lv-spelling { --b1: #5a3d1e; --b2: #87602f; }
.lv-biology { --b1: #1f5a3a; --b2: #2f8055; }
.lv-chemistry { --b1: #4a2a5e; --b2: #6e4590; }
.lv-physics { --b1: #1d3f66; --b2: #2d6299; }
.lv-skills { --b1: #3d4a55; --b2: #5b6b78; }
.lv-literature { --b1: #5c2a33; --b2: #85424e; }
.lv-wellbeing { --b1: #6a2c4b; --b2: #944068; }
.lv-relationships { --b1: #5a3462; --b2: #7d4d88; }
.lv-world { --b1: #1f4f5c; --b2: #2f7282; }
.lv-banner-text { position: relative; z-index: 1; min-width: 0; }
.lv-kicker { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.lv-banner h2 { color: #fff; font-size: 1.9rem; line-height: 1.2; margin: 6px 0 6px; }
.lv-banner p { color: rgba(255,255,255,.85); max-width: 640px; }
.lv-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: .85rem; color: rgba(255,255,255,.9); }
.lv-meta span { display: inline-flex; align-items: center; gap: 6px; }
.lv-meta .st-ic { width: 15px; height: 15px; }
.lv-listen { margin-top: 18px; display: flex; gap: 8px; }
.lv-listen-btn { background: #fff !important; color: var(--ink) !important; display: inline-flex; align-items: center; gap: 8px; }
.lv-listen-btn:hover { background: #eef2f8 !important; }
.lv-stop { background: rgba(255,255,255,.12) !important; color: #fff !important; border-color: rgba(255,255,255,.4) !important; }
.lv-art { width: 190px; height: auto; position: relative; z-index: 1; }
.lv-art g { fill: none; stroke: rgba(255,255,255,.92); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.lv-art .g { stroke: #e2c06b; }
.lv-art .gf { fill: rgba(226,192,107,.55); stroke: #e2c06b; }
.lv-art .d circle { fill: rgba(255,255,255,.85); stroke: none; }
.lv-art text { fill: rgba(255,255,255,.9); stroke: none; font: 600 11px var(--font-body); }
.lv-art text.big { font: 700 26px var(--font-display); }
.lv-art text.g { fill: #e2c06b; }

.lv-layout { align-items: start; }
/* the lesson's own video, large under the banner (video-player.js MentoraVideo.hero) */
.lv-hero { margin: 18px 0 20px; }
.mv-hero { max-width: 1040px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.mv-hero .mv-hero-frame { border-radius: 0; }
.mv-hero-start { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #0f1b33; cursor: pointer; display: grid; place-items: center; }
.mv-hero-start img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mv-hero-play { position: relative; width: 92px; height: 92px; border-radius: 50%; background: rgba(31, 58, 104, .92); display: grid; place-items: center; box-shadow: 0 10px 28px rgba(0, 0, 0, .35); transition: transform .15s, background .15s; }
.mv-hero-play svg { width: 44px; height: 44px; fill: #fff; margin-left: 5px; }
.mv-hero-start:hover .mv-hero-play, .mv-hero-start:focus-visible .mv-hero-play { transform: scale(1.06); background: #1f3a68; }
.mv-hero-label { position: absolute; left: 16px; bottom: 16px; padding: 7px 14px; border-radius: 999px; background: rgba(15, 27, 51, .82); color: #fff; font-weight: 600; font-size: .95rem; }
/* floating mini player: the started video moves to a corner while the big player is scrolled away */
.mv-hero.mv-floating { aspect-ratio: 16 / 9; background: #0f1b33; display: grid; place-items: center; }
.mv-hero.mv-floating::after { content: 'Playing in the corner'; color: rgba(255, 255, 255, .7); font-weight: 600; }
.mv-hero .mv-frame.mv-float { position: fixed; right: 20px; bottom: 20px; width: clamp(240px, 32vw, 420px); z-index: 150; border-radius: 12px; overflow: hidden; box-shadow: 0 14px 40px rgba(9, 16, 32, .45); animation: mvFloatIn .2s ease both; }
@keyframes mvFloatIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.mv-float-bar { position: absolute; top: 8px; right: 8px; z-index: 6; display: none; gap: 6px; }
.mv-frame.mv-float .mv-float-bar { display: flex; }
.mv-float-bar button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(15, 27, 51, .88); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.mv-float-bar button:hover, .mv-float-bar button:focus-visible { background: #1f3a68; }
.mv-frame.mv-float .mv-reveal { bottom: 10px; padding: 8px 10px 8px 12px; gap: 8px; border-radius: 10px; }
.mv-frame.mv-float .mv-reveal p { font-size: 12px; }
.mv-frame.mv-float .mv-reveal p strong { font-size: 13px; }
.mv-frame.mv-float .mv-reveal button { font-size: 13px; padding: 6px 10px; }
@media (max-width: 640px) { .mv-hero .mv-frame.mv-float { right: 12px; bottom: 12px; width: min(62vw, 300px); } }
@media (max-width: 640px) { .mv-hero-play { width: 68px; height: 68px; } .mv-hero-play svg { width: 32px; height: 32px; } .mv-hero-label { left: 10px; bottom: 10px; font-size: .85rem; } }
.lv-side { position: sticky; top: 16px; }
.lv-side-note { color: var(--muted); font-size: .82rem; margin: 2px 0 10px; }
.lv-lesson { padding: 26px 30px; }
.lv-sec { padding: 4px 0 22px; border-bottom: 1px solid #edf0f4; margin-bottom: 20px; }
.lv-sec:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.lv-sec h3 { display: flex; align-items: center; gap: 12px; font-size: 1.22rem; margin: 0 0 14px !important; }
.lv-num { width: 30px; height: 30px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font: 600 .85rem var(--font-body); flex-shrink: 0; }
.lv-say { border-radius: 8px; transition: background .25s, box-shadow .25s; }
.lv-say.is-reading { background: #fff6d6; box-shadow: 0 0 0 6px #fff6d6; }
.lv-keyidea { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; background: linear-gradient(135deg, #f3f6fb, #eaf0f8); border-left: 4px solid var(--violet); border-radius: 0 var(--r-md) var(--r-md) 0; padding: 16px 18px; margin-bottom: 14px; font-size: 1.06rem; }
.lv-keyidea .lv-diagram:empty { display: none; }
.lv-keyidea > .lv-say { flex: 1 1 280px; min-width: 0; }   /* text keeps a readable width; a wide diagram moves underneath */
.lv-keyidea > .lv-diagram { flex: 0 1 auto; max-width: 100%; margin: 0 auto; }
.lv-diagram { display: flex; justify-content: center; }
.lv-diagram:empty { display: none; }
.lv-diagram .viz { transform: scale(.9); transform-origin: center; margin: 0; }
.lv-example { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; margin: 0 0 14px; background: #fff; box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s; }
.lv-example.is-playing { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.lv-ex-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.lv-ex-n { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sea); }
.lv-ex-play { display: inline-flex; align-items: center; gap: 6px; }
.lv-ex-play .st-ic { width: 12px; height: 12px; }
.lv-example .se-q { font-size: 1.08rem; font-weight: 600; }
.lv-example .lv-diagram { margin: 10px 0 4px; }
.lv-steps { list-style: none; margin: 12px 0 6px; padding: 0; counter-reset: step; }
.lv-steps li { position: relative; padding: 4px 0 10px 40px; counter-increment: step; transition: opacity .35s, transform .35s; }
.lv-steps li::before { content: counter(step); position: absolute; left: 0; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--violet-soft); color: var(--violet); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.lv-steps li::after { content: ''; position: absolute; left: 12.5px; top: 30px; bottom: 0; width: 1px; background: #d8dfea; }
.lv-steps li:last-child::after { display: none; }
.lv-steps li.is-hidden, .lv-answer.is-hidden { opacity: 0; transform: translateY(6px); }
.lv-answer { display: inline-flex; align-items: baseline; gap: 10px; background: var(--go-soft); border-radius: var(--r-md); padding: 8px 14px; margin-top: 4px; transition: opacity .35s, transform .35s; }
.lv-ans-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--go-deep); }
.lv-answer .se-a { font-weight: 650; color: var(--go-deep); }
.lv-tips { display: grid; gap: 10px; }
.lv-tip { position: relative; padding: 12px 14px 12px 46px; background: #fbf6ea; border: 1px solid #f0e3c4; border-radius: var(--r-md); line-height: 1.55; }
.lv-tip::before { content: '!'; position: absolute; left: 14px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: #b7791f; color: #fff; font-weight: 800; font-size: .8rem; display: grid; place-items: center; }
.lv-word { border: none; cursor: pointer; font: inherit; font-size: .85rem; padding: 6px 12px; }
.lv-word:hover { background: var(--violet-soft); color: var(--violet); }
.lv-check { background: #f6f8fb; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.lv-check-q { font-weight: 600; font-size: 1.05rem; margin-bottom: 12px; }
.lv-check-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.lv-check-opt { border: 1px solid #cfd7e2; background: #fff; border-radius: var(--r-md); padding: 10px 12px; font: inherit; text-align: left; cursor: pointer; }
.lv-check-opt:hover { border-color: var(--violet); }
.lv-check-opt.is-on { border-color: var(--violet); background: var(--violet-soft); }
.lv-check-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lv-check-in { max-width: 220px; }
.lv-check-fb { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-md); font-size: .95rem; animation: screenFade .25s; }
.lv-check-fb.is-right { background: var(--go-soft); color: var(--go-deep); }
.lv-check-fb.is-wrong { background: #fbf3e2; color: #7a4f12; }
.lv-sec-finish p { color: var(--ink-soft); margin-bottom: 12px; }
.lv-finish .btn { display: inline-flex; align-items: center; gap: 8px; }
.lv-finish.is-fresh { animation: screenFade .35s; }
.lv-done { display: flex; gap: 14px; align-items: center; background: var(--go-soft); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 14px; }
.lv-done-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--go); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.lv-done strong { font-size: 1.05rem; color: var(--go-deep); }
.lv-done p { margin: 2px 0 0 !important; color: var(--go-deep) !important; }
.lv-next { display: flex; gap: 10px; flex-wrap: wrap; }
/* Lesson → Practice → Test (the website's three pillars: Learn navy, Practise green, Test amber) */
.lv-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: -6px 0 20px; counter-reset: none; }
.lv-flow-step { --c: #1f3a68; --bg: #e9eef7; position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; text-align: left;
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.lv-flow-practice { --c: #22603f; --bg: #e5f3ec; }
.lv-flow-test { --c: #8a5a1f; --bg: #f6eedf; }
.lv-flow-step:hover:not(:disabled) { border-color: var(--c); background: var(--bg); }
.lv-flow-step:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
.lv-flow-step:disabled { cursor: default; opacity: .55; }
.lv-flow-step.is-next { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); background: var(--bg); }
.lv-flow-n { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--c); background: var(--bg); border: 2px solid var(--c); }
.lv-flow-step.is-next .lv-flow-n, .lv-flow-step.is-done .lv-flow-n { background: var(--c); color: #fff; }
.lv-flow-n .st-ic { width: 16px; height: 16px; }
.lv-flow-t { display: grid; gap: 2px; min-width: 0; }
.lv-flow-t strong { font-size: 1rem; color: var(--c); }
.lv-flow-t em { font-style: normal; font-weight: 600; color: var(--ink-soft); font-size: .9rem; }
.lv-flow-t small { color: var(--ink-soft); font-size: .84rem; }
@media (max-width: 700px) { .lv-flow { grid-template-columns: 1fr; gap: 8px; } .lv-flow-step { min-height: 56px; padding: 10px 14px; } }
.lv-go-practice { background: var(--go) !important; }
.lv-go-practice:hover { background: var(--go-deep) !important; }
.lv-videos { display: grid; gap: 10px; }
.lv-video { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: center; text-decoration: none; color: var(--ink); border-radius: var(--r-md); padding: 6px; }
.lv-video:hover { background: #f3f5f8; }
.lv-vthumb { position: relative; height: 56px; border-radius: 8px; background: linear-gradient(120deg, var(--b1, #1f3a68), var(--b2, #2d5590)); display: grid; place-items: center; overflow: hidden; }
.lv-vthumb .lv-art { width: 70px; opacity: .45; }
.lv-vplay { position: absolute; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--ink); display: grid; place-items: center; }
.lv-vplay .st-ic { width: 12px; height: 12px; margin-left: 2px; }
.lv-vtext strong { display: block; font-size: .86rem; font-weight: 600; line-height: 1.3; }
.lv-vtext small { color: var(--muted); font-size: .76rem; }
.lv-more { padding: 4px 6px; color: var(--muted); }
.lv-files { margin-top: 6px; }
.lv-files summary { cursor: pointer; padding: 8px 6px; border-radius: var(--r-sm); font-size: .86rem; font-weight: 600; color: var(--ink); }
.lv-files summary:hover { background: #f3f5f8; }
.lv-files[open] summary { margin-bottom: 2px; }
@media (max-width: 1080px) { .lv-side { position: static; } }
@media (max-width: 860px) {
  .lv-banner { grid-template-columns: 1fr; padding: 20px; }
  .lv-art { display: none; }
  .lv-banner h2 { font-size: 1.45rem; }
  .lv-lesson { padding: 18px; }
  .lv-keyidea { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Gamification (practice streaks/points, results stars, dashboard level/goal/achievements)
   ========================================================================== */
.st-ic[data-icon="flame"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c1 4 5 6 5 11a5 5 0 0 1-10 0c0-2 1-3.5 2-4.5 0 2 1 3 2 3 0-3-1-6 1-9.5z'/%3E%3C/svg%3E"); }
.st-ic[data-icon="star"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.8 5.9 6.4.8-4.7 4.4 1.2 6.4L12 17.2l-5.7 3.1 1.2-6.4L2.8 9.5l6.4-.8z'/%3E%3C/svg%3E"); }
.st-ic[data-icon="medal"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h4l1 5-3 1zM17 2h-4l-1 5 3 1z'/%3E%3Ccircle cx='12' cy='15' r='7'/%3E%3C/svg%3E"); }

/* practice HUD */
.ex-hud { display: inline-flex; gap: 6px; margin-left: 4px; }
.ex-hud-chip { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: #eef2f8; color: var(--ink-soft); }
.ex-hud-chip .st-ic { width: 13px; height: 13px; color: #b7791f; }
.ex-hud-chip b { color: var(--ink); }
.ex-hud-chip.is-hot { background: #fdf0dc; color: #8a5a12; animation: hudPop .4s ease; }
.ex-hud-chip.is-hot .st-ic { color: #d9822b; }
@keyframes hudPop { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }
#exNext.is-check { background: var(--violet); }
.ex-answer.is-locked { pointer-events: none; opacity: .85; }
.ex-feedback:empty { display: none; }
.ex-fb { margin-top: 16px; border-radius: var(--r-lg); padding: 14px 16px; border: 1px solid; animation: screenFade .3s; }
.ex-fb.is-right { background: var(--go-soft); border-color: #bfe0cc; }
.ex-fb.is-part { background: #fbf3e2; border-color: #efdcb4; }
.ex-fb.is-wrong { background: #fcefef; border-color: #f0cfcf; }
.ex-fb.is-tutor { background: #eef2f8; border-color: var(--line); }
.ex-fb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ex-fb-head strong { font-size: 1.05rem; }
.ex-fb.is-right .ex-fb-head strong { color: var(--go-deep); }
.ex-fb.is-wrong .ex-fb-head strong { color: var(--coral); }
.ex-fb-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .85rem; }
.ex-fb.is-right .ex-fb-ic { background: var(--go); } .ex-fb.is-right .ex-fb-ic::after { content: '✓'; }
.ex-fb.is-part .ex-fb-ic { background: var(--sun); } .ex-fb.is-part .ex-fb-ic::after { content: '½'; }
.ex-fb.is-wrong .ex-fb-ic { background: var(--coral); } .ex-fb.is-wrong .ex-fb-ic::after { content: '✗'; }
.ex-fb.is-tutor .ex-fb-ic { background: var(--muted); } .ex-fb.is-tutor .ex-fb-ic::after { content: 'i'; }
.ex-fb-pts { margin-left: auto; font-weight: 700; font-size: .9rem; color: #8a5a12; background: #fff; border-radius: 99px; padding: 3px 10px; box-shadow: var(--shadow-sm); animation: hudPop .5s ease; }
.ex-fb-key { margin-top: 8px; }
.ex-fb-ms { margin-top: 6px; color: var(--ink-soft); font-size: .95rem; line-height: 1.5; }
.ex-card.pulse-right { animation: pulseRight .6s ease; }
.ex-card.pulse-wrong { animation: pulseWrong .45s ease; }
@keyframes pulseRight { 0% { box-shadow: 0 0 0 0 rgba(45,122,85,.45); } 100% { box-shadow: 0 0 0 14px rgba(45,122,85,0); } }
@keyframes pulseWrong { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* results */
.rv-game { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 24px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 22px; margin-top: 14px; box-shadow: var(--shadow-sm); }
.rv-stars { display: flex; gap: 4px; }
.rv-star { width: 40px; height: 40px; fill: #e5e9f0; transition: fill .3s; }
.rv-star.is-on { fill: #d4a52a; animation: starIn .5s cubic-bezier(.3,1.6,.5,1) backwards; }
.rv-star.is-on:nth-child(2) { animation-delay: .15s; } .rv-star.is-on:nth-child(3) { animation-delay: .3s; }
@keyframes starIn { from { transform: scale(0) rotate(-40deg); } to { transform: none; } }
.rv-game-stats { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.rv-game-stats div { display: flex; flex-direction: column; }
.rv-game-stats b { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.1; }
.rv-game-stats span { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.rv-medals { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.rv-medal { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; padding: 5px 12px 5px 8px; border-radius: 99px; animation: screenFade .4s .4s backwards; }
.rv-medal .st-ic { width: 16px; height: 16px; }
.rv-medal.is-gold { background: #fbf1d6; color: #7a5a10; }
.rv-medal.is-navy { background: var(--violet-soft); color: var(--violet); }
.rv-medal.is-green { background: var(--go-soft); color: var(--go-deep); }
.rv-medal.is-amber { background: #fdf0dc; color: #8a5a12; }
.rv-medal-note { color: var(--muted); font-size: .85rem; }

/* dashboard */
.gm-row { grid-template-columns: 1fr 1fr 1.3fr; }
.gm-level { display: flex; gap: 16px; align-items: center; }
.gm-badge { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; background: radial-gradient(circle at 30% 30%, #2f5c96, #142848); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 0 4px #e9eef7, 0 0 0 5px #d4a52a; }
.gm-badge small { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.gm-badge strong { font-family: var(--font-display); font-size: 1.7rem; line-height: 1; }
.gm-lv-main { flex: 1; min-width: 0; }
.gm-lv-main h3, .gm-goal h3 { font-size: 1.1rem; margin: 2px 0 8px; }
.gm-lv-main p, .gm-goal p { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.gm-goal { display: flex; gap: 16px; align-items: center; }
.gm-ring { --p: 0; width: 84px; height: 84px; flex-shrink: 0; border-radius: 50%; background: conic-gradient(var(--go) calc(var(--p) * 1%), #e8ecf2 0); display: grid; place-items: center; }
.gm-ring > div { width: 66px; height: 66px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gm-ring strong { font-family: var(--font-display); font-size: 1.3rem; line-height: 1; }
.gm-ring span { font-size: .66rem; color: var(--muted); }
.gm-medals { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.gm-medal { aspect-ratio: 1; border-radius: 50%; background: #eef1f5; color: #c5ccd8; display: grid; place-items: center; }
.gm-medal .st-ic { width: 55%; height: 55%; }
.gm-medal.is-on { background: linear-gradient(145deg, #f7e6b0, #d4a52a); color: #6b4c0c; box-shadow: 0 2px 6px rgba(180,130,20,.3); }
.gm-next { margin-top: 12px; font-size: .84rem; color: var(--ink-soft); }

/* topic stars */
.tp-stars { display: inline-flex; gap: 2px; flex-shrink: 0; }
.tp-star { width: 13px; height: 13px; background: #dfe4ec; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.8 5.9 6.4.8-4.7 4.4 1.2 6.4L12 17.2l-5.7 3.1 1.2-6.4L2.8 9.5l6.4-.8z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.8 5.9 6.4.8-4.7 4.4 1.2 6.4L12 17.2l-5.7 3.1 1.2-6.4L2.8 9.5l6.4-.8z'/%3E%3C/svg%3E") center / contain no-repeat; }
.tp-star.is-on { background: #d4a52a; }
@media (max-width: 1080px) { .gm-row { grid-template-columns: 1fr 1fr; } .gm-ach { grid-column: 1 / -1; } }
@media (max-width: 860px) { .gm-row { grid-template-columns: 1fr; } .rv-game { grid-template-columns: 1fr; } .ex-hud { display: none; } }

.st-logo svg { width: 22px; height: 22px; color: #fff; }
.st-brand-lg .st-logo svg { width: 28px; height: 28px; }
.set-about { margin-top: 16px; padding: 12px 14px; background: #f6f8fb; border-radius: var(--r-md); font-size: .85rem; color: var(--ink-soft); line-height: 1.5; word-break: break-all; }

/* ---------- sign in & first-sign-in profile */
#screenLogin, #screenProfile { background: #f3f1ec; }
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-side { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; gap: 40px; padding: 44px 56px; color: #d9e2ef;
  background: #142848 radial-gradient(120% 80% at 0% 0%, #23457a 0%, rgba(35, 69, 122, 0) 60%); }
.auth-side::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 28px 28px; }
.auth-side > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 20px; }
.auth-brand strong { display: block; font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: #fff; letter-spacing: .005em; }
.auth-brand small { display: block; font-size: .78rem; color: #aebcd2; margin-top: 2px; letter-spacing: .02em; }
.auth-eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #d4a52a; margin-bottom: 14px; }
.auth-side h1 { color: #fff; font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.18; max-width: 500px; }
.auth-lede { color: #c3cfe0; font-size: 1.05rem; line-height: 1.6; max-width: 470px; margin-top: 16px; }
.auth-points { list-style: none; display: grid; gap: 22px; margin-top: 40px; padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, .12); max-width: 480px; padding: 0; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; }
.auth-points svg { width: 22px; height: 22px; color: #d4a52a; flex-shrink: 0; margin-top: 2px; }
.auth-points strong { display: block; color: #fff; font-weight: 600; font-size: .98rem; }
.auth-points span { display: block; color: #b9c7dc; font-size: .9rem; line-height: 1.5; margin-top: 2px; }
.auth-side-body { margin: auto 0; }
.auth-side-foot { font-size: .8rem; color: #8fa1bd; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 18px; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; gap: 18px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid #e4e1d8; border-radius: var(--r-lg); padding: 36px 34px 28px; box-shadow: 0 1px 2px rgba(20, 40, 72, .04), 0 18px 40px rgba(20, 40, 72, .08); border-top: 4px solid var(--violet); }
.auth-kicker { font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sun); }
.auth-card h2 { font-size: 1.75rem; margin-top: 6px; }
.auth-field { position: relative; display: flex; align-items: center; }
.auth-field > svg { position: absolute; left: 12px; width: 19px; height: 19px; color: #8592a6; pointer-events: none; }
.auth-field .text-input { width: 100%; font-size: 1rem; padding: 12px 13px 12px 40px; background: #fbfbfa; }
.auth-field .text-input:focus { background: #fff; }
.auth-field .text-input::placeholder { color: #a5aebb; font-weight: 400; }
.auth-eye { position: absolute; right: 6px; border: 0; background: none; font: 600 .8rem var(--font-body); color: var(--violet); padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; }
.auth-eye:hover { background: var(--violet-soft); }
#loginPass { padding-right: 64px; }
.auth-card .login-btn { background: var(--violet); color: #fff; }
.auth-card .login-btn:hover { background: var(--violet-deep); }
.auth-help { margin-top: 16px; font-size: .86rem; color: var(--ink-soft); text-align: center; }
.auth-card .login-foot { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }
.auth-card .login-foot .login-new { display: flex; justify-content: center; width: 100%; min-height: 46px; font-size: .95rem; }
.auth-card .login-foot .login-back { display: inline-block; margin-top: 12px; font-size: .88rem; color: var(--ink-soft); }
.auth-card .login-foot .login-back:hover { color: var(--ink); }
.auth-tutor { font-size: .82rem; color: var(--muted); }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-side { padding: 20px 20px 18px; gap: 0; }
  .auth-side h1 { font-size: 1.45rem; }
  .auth-side-body, .auth-side-foot, .auth-eyebrow { display: none; }
  .auth-main { justify-content: flex-start; padding: 24px 16px 32px; }
  .auth-card { padding: 28px 22px 22px; }
}

.prof-wrap { max-width: 980px; margin: 0 auto; padding: 22px 24px 48px; }
.prof-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.auth-brand-sm strong { color: var(--ink); font-size: 1.5rem; }
.auth-brand-sm small { color: var(--muted); }
.prof-card { background: #fff; border: 1px solid #e4e1d8; border-top: 4px solid var(--violet); border-radius: var(--r-lg); padding: 32px 34px 30px; box-shadow: 0 18px 40px rgba(20, 40, 72, .07); }
.prof-head h2 { font-size: 1.7rem; margin-top: 6px; }
.prof-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; margin-top: 8px; align-items: start; }
.prof-fields .text-input { width: 100%; font-size: 1rem; padding: 11px 13px; background: #fbfbfa; }
.prof-dob { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.prof-dob legend.st-label { margin-top: 0; padding: 0; }
.prof-dob-row { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 10px; }
.prof-idcard { margin-top: 38px; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid #dfe4ec; box-shadow: 0 10px 26px rgba(20, 40, 72, .12); }
.idc-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--violet); color: #fff; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.idc-body { display: flex; gap: 14px; align-items: center; padding: 20px 16px 16px; }
.idc-emb .emb { width: 64px; height: 64px; border-radius: 14px; }
.idc-emb .emb svg { width: 36px; height: 36px; }
.idc-emb:empty { width: 64px; height: 64px; border-radius: 14px; border: 2px dashed #cdd5e1; }
.idc-text { min-width: 0; display: grid; gap: 3px; }
.idc-text strong { font-family: var(--font-display); font-size: 1.12rem; color: var(--ink); overflow-wrap: anywhere; }
.idc-text span { font-size: .84rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.idc-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: #f6f4ee; border-top: 1px solid #ebe7dc; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.idc-foot code { font: 600 .86rem var(--font-body); color: var(--ink); text-transform: none; letter-spacing: 0; }
.prof-emblems { border: 0; padding: 0; margin: 26px 0 0; min-width: 0; }
.emb-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.emb-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 10px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fff; cursor: pointer; font: 500 .8rem var(--font-body); color: var(--ink-soft); transition: border-color .15s, box-shadow .15s, transform .15s; }
.emb-opt:hover { border-color: #b9c4d4; transform: translateY(-1px); }
.emb-opt[aria-checked="true"] { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); color: var(--violet); font-weight: 600; }
.emb-opt:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.prof-actions { display: flex; justify-content: flex-end; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.prof-actions .btn { background: var(--violet); color: #fff; min-width: 220px; }
.prof-actions .btn:hover { background: var(--violet-deep); }
@media (max-width: 860px) {
  .prof-wrap { padding: 16px 16px 40px; }
  .prof-card { padding: 24px 18px 22px; }
  .prof-grid { grid-template-columns: 1fr; gap: 8px; }
  .prof-idcard { margin-top: 18px; order: -1; }
  .emb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .prof-actions .btn { width: 100%; }
}

/* emblems */
.emb { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.emb svg { width: 26px; height: 26px; }
.emb-owl { background: #efe9f6; color: #5b3d86; }
.emb-book { background: #e9eef7; color: #1f3a68; }
.emb-compass { background: #fbf0e4; color: #9a5a17; }
.emb-globe { background: #e4f1f1; color: #1d5c63; }
.emb-atom { background: #e8f1fa; color: #2b6cb0; }
.emb-quill { background: #f6e9ee; color: #8b3a62; }
.emb-telescope { background: #ecebf8; color: #3f3d8f; }
.emb-lightbulb { background: #fbf3e2; color: #8a6312; }
.emb-rocket { background: #fbeaea; color: #a33232; }
.emb-leaf { background: #e5f3ec; color: #22603f; }
.emb-knight { background: #eceff3; color: #3a4658; }
.emb-star { background: #fdf5dc; color: #9b7a10; }
.st-who .emb, .tt-name .emb { width: 36px; height: 36px; border-radius: 50%; }
.st-who .emb svg, .tt-name .emb svg { width: 21px; height: 21px; }
.tt-profile { display: flex; gap: 16px; align-items: center; padding: 14px 16px; margin-bottom: 16px; background: #f8f7f3; border: 1px solid #ebe7dc; border-radius: var(--r-md); }
.tt-profile dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 22px; margin: 0; flex: 1; }
.tt-profile dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.tt-profile dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.tt-profile-none { margin-bottom: 14px; }
@media (max-width: 860px) { .tt-profile dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.auth-field .text-input { height: 48px; border: 1px solid #d5dbe4; }
.auth-field .text-input:hover { border-color: #b8c2d0; }
.auth-field .text-input:focus, .auth-field .text-input:focus-visible { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(31, 58, 104, .18); }
.auth-card .login-btn { height: 48px; padding: 0 22px; }
.auth-card .login-btn:focus-visible, .auth-eye:focus-visible { outline: 3px solid rgba(31, 58, 104, .35); outline-offset: 2px; }
.auth-card .login-sub { margin-top: 6px; margin-bottom: 4px; }

/* ---------- Mentora tile logo (sign-in, profile, student card) */
.auth-logo { display: inline-grid; place-items: center; flex-shrink: 0; width: 84px; height: 84px; border-radius: 22px; background: #fff; color: var(--violet); box-shadow: 0 12px 28px rgba(4, 12, 30, .32); }
.auth-logo svg { width: 50px; height: 50px; overflow: visible; }
.auth-brand-sm .auth-logo { width: 50px; height: 50px; border-radius: 14px; background: var(--violet); color: #fff; box-shadow: 0 6px 16px rgba(20, 40, 72, .2); }
.auth-brand-sm .auth-logo svg { width: 29px; height: 29px; }
.idc-top .auth-logo { width: 26px; height: 26px; border-radius: 7px; box-shadow: none; }
.idc-top .auth-logo svg { width: 16px; height: 16px; }
@media (max-width: 900px) {
  .auth-logo { width: 54px; height: 54px; border-radius: 15px; }
  .auth-logo svg { width: 32px; height: 32px; }
  .auth-brand strong { font-size: 1.75rem; }
}

/* ---------- sign-in animations (play each time the screen opens) */
@keyframes mtFadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes mtFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mtLogoIn { 0% { opacity: 0; transform: scale(.6) rotate(-8deg); } 60% { opacity: 1; transform: scale(1.06) rotate(1deg); } 100% { transform: none; } }
@keyframes mtDraw { to { stroke-dashoffset: 0; } }
@keyframes mtDot { 0% { transform: scale(0); } 70% { transform: scale(1.5); } 100% { transform: scale(1); } }
@keyframes mtGlow { 0%, 100% { transform: translate(0, 0) scale(1); opacity: .55; } 50% { transform: translate(8%, 6%) scale(1.15); opacity: .85; } }
@keyframes mtShake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes mtOut { to { opacity: 0; transform: translateY(-14px) scale(.98); } }
@keyframes mtSpin { to { transform: rotate(360deg); } }
@keyframes mtPop { 0% { transform: scale(.7); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: none; } }

.auth-side::before { content: ''; position: absolute; width: 70%; height: 70%; left: -10%; top: -15%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(76, 122, 196, .45) 0%, rgba(76, 122, 196, 0) 70%); animation: mtGlow 16s ease-in-out infinite; }
.screen.active .auth-side .auth-logo { animation: mtLogoIn .8s cubic-bezier(.2, .8, .2, 1) both; }
.screen.active .lg-m { stroke-dasharray: 60; stroke-dashoffset: 60; animation: mtDraw .9s .35s cubic-bezier(.6, 0, .3, 1) forwards; }
.screen.active .lg-dot { transform-box: fill-box; transform-origin: center; animation: mtDot .55s 1.1s cubic-bezier(.3, 1.6, .5, 1) both; }
.screen.active .auth-brand strong { animation: mtFadeIn .7s .45s both; }
#screenLogin.active .auth-side h1 { animation: mtFadeUp .7s .55s cubic-bezier(.2, .8, .2, 1) both; }
#screenLogin.active .auth-lede { animation: mtFadeUp .7s .7s cubic-bezier(.2, .8, .2, 1) both; }
#screenLogin.active .auth-points li { animation: mtFadeUp .6s cubic-bezier(.2, .8, .2, 1) both; }
#screenLogin.active .auth-points li:nth-child(1) { animation-delay: .85s; }
#screenLogin.active .auth-points li:nth-child(2) { animation-delay: .97s; }
#screenLogin.active .auth-points li:nth-child(3) { animation-delay: 1.09s; }
#screenLogin.active .auth-card { animation: mtFadeUp .7s .25s cubic-bezier(.2, .8, .2, 1) both; }
.auth-card.is-shaking { animation: mtShake .42s ease !important; }
.auth.is-leaving .auth-card { animation: mtOut .4s ease forwards !important; }
.auth.is-leaving .auth-side-body, .auth.is-leaving .auth-brand { transition: opacity .4s ease; opacity: 0; }

/* smooth interaction states */
.auth-field .text-input { transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
.auth-field > svg { transition: color .18s ease; }
.auth-field:focus-within > svg { color: var(--violet); }
.auth-card .login-btn, .prof-actions .btn { position: relative; transition: background-color .18s ease, transform .12s ease, box-shadow .18s ease; }
.auth-card .login-btn:hover, .prof-actions .btn:hover { box-shadow: 0 8px 18px rgba(20, 40, 72, .22); transform: translateY(-1px); }
.auth-card .login-btn:active, .prof-actions .btn:active { transform: translateY(0) scale(.99); box-shadow: none; }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: mtSpin .7s linear infinite; }
.login-error:not([hidden]) { animation: mtFadeIn .25s ease; }

/* first-sign-in profile */
#screenProfile.active .prof-card { animation: mtFadeUp .7s .1s cubic-bezier(.2, .8, .2, 1) both; }
#screenProfile.active .prof-idcard { animation: mtFadeUp .7s .35s cubic-bezier(.2, .8, .2, 1) both; }
#screenProfile.active .emb-opt { animation: mtFadeUp .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.45s + var(--i, 0) * 40ms); }
.emb-opt .emb { transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.emb-opt:hover .emb { transform: scale(1.08); }
.emb-opt[aria-checked="true"] .emb { transform: scale(1.12); }
.idc-emb .emb { animation: mtPop .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.idc-text strong, .idc-text span { transition: color .2s ease; }

@media (prefers-reduced-motion: reduce) {
  #screenLogin *, #screenLogin *::before, #screenProfile *, #screenProfile *::before, #screenProfile *::after { animation: none !important; transition: none !important; }
  .lg-m { stroke-dashoffset: 0 !important; }
  .btn.is-busy { color: #fff !important; }
}

/* ---------- tutor: content access */
.tt-access { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; align-items: start; }
.tt-access fieldset { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px 10px; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tt-access legend { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 6px; }
.tt-check { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .9rem; font-weight: 500; color: var(--ink-soft); transition: border-color .15s, background-color .15s, color .15s; }
.tt-check:hover { border-color: #b9c4d4; }
.tt-check input { width: 16px; height: 16px; accent-color: var(--violet); margin: 0; }
.tt-check:has(input:checked) { border-color: var(--violet); background: var(--violet-soft); color: var(--violet); }
.tt-check:has(input:focus-visible) { outline: 3px solid rgba(31, 58, 104, .3); outline-offset: 2px; }
.tt-access-actions { grid-column: 1 / -1; display: flex; gap: 10px; }
.tt-access-note { margin-top: 12px; font-size: .84rem; color: var(--muted); }
.tt-courses .st-pill { margin: 2px 0; white-space: nowrap; }
.st-empty-inline { color: var(--muted); font-size: .85rem; }
@media (max-width: 860px) { .tt-access { grid-template-columns: 1fr; } }

/* ---------- homework */
.st-ic[data-icon="homework"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='2'/%3E%3Cpath d='M9 4V3h6v1M9 11l2 2 4-4M9 17h6'/%3E%3C/svg%3E"); }
#stNav button { position: relative; }
.st-nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--violet); color: #fff; font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; }
.st-nav-count.is-late { background: var(--coral); }

.st-top { position: relative; }
.st-bell-wrap { position: relative; margin-left: auto; }
.st-top-actions:not(:empty) + .st-bell-wrap { margin-left: 0; }
.st-bell { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 6px rgba(20, 40, 72, .06); transition: background-color .15s, box-shadow .15s, transform .15s; }
.st-bell:hover { background: var(--violet-soft); box-shadow: 0 6px 16px rgba(20, 40, 72, .12); }
.st-bell[aria-expanded="true"] { background: var(--violet); color: #fff; border-color: var(--violet); }
.st-bell:focus-visible { outline: 3px solid rgba(31, 58, 104, .35); outline-offset: 2px; }
.st-bell svg { width: 22px; height: 22px; }
.st-bell-count { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; border: 2px solid #fff; background: var(--violet); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; animation: mtPop .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.st-bell-count.is-late { background: var(--coral); }
@keyframes bellRing { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } }
.st-bell:has(.st-bell-count:not([hidden])) svg { transform-origin: 50% 10%; animation: bellRing 1.1s ease .3s 1; }
.st-bell-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 22px 50px rgba(20, 40, 72, .18); z-index: 60; overflow: hidden; animation: mtFadeUp .22s cubic-bezier(.2, .8, .2, 1) both; }
.bell-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.bell-head strong { font-family: var(--font-display); font-size: 1.1rem; }
.bell-head span { font-size: .82rem; color: var(--muted); }
.bell-list { list-style: none; margin: 0; padding: 6px; max-height: 360px; overflow: auto; }
.bell-item { width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 10px; border: 0; background: none; border-radius: var(--r-md); cursor: pointer; font: inherit; color: inherit; }
.bell-item:hover, .bell-item:focus-visible { background: #f4f6f9; outline: none; }
.bell-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--violet); margin-top: 6px; flex-shrink: 0; }
.bell-item.is-late .bell-dot { background: var(--coral); }
.bell-text strong { display: block; font-size: .92rem; color: var(--ink); line-height: 1.35; }
.bell-text small { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.bell-item.is-late small { color: var(--coral); font-weight: 600; }
.bell-empty { padding: 22px 16px; color: var(--muted); text-align: center; }
.bell-all { width: 100%; border: 0; border-top: 1px solid var(--line); background: #fafbfc; padding: 12px; font: 600 .88rem var(--font-body); color: var(--violet); cursor: pointer; }
.bell-all:hover { background: var(--violet-soft); }

.hw-stats .st-stat.is-alert { border-color: #f0c9c9; background: #fff8f8; }
.hw-stats .st-stat.is-alert .st-stat-value { color: var(--coral); }
.hw-list { list-style: none; margin: 0; padding: 0; }
.hw-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--line); animation: mtFadeUp .35s cubic-bezier(.2, .8, .2, 1) both; }
.hw-row:first-child { border-top: 0; }
.hw-row.is-done { opacity: .75; }
.hw-kind { width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0; background: var(--violet-soft); position: relative; }
.hw-kind::after { content: ''; position: absolute; inset: 10px; background: var(--violet); -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat;
  --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='2'/%3E%3Cpath d='M9 4V3h6v1M9 11l2 2 4-4M9 17h6'/%3E%3C/svg%3E"); }
.hw-kind-lesson { background: #e4f1f1; } .hw-kind-lesson::after { background: #1d5c63; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4.5A2.5 2.5 0 0 1 6.5 2H20v17H6.5A2.5 2.5 0 0 0 4 21.5z'/%3E%3Cpath d='M4 21.5V4.5'/%3E%3C/svg%3E"); }
.hw-kind-paper { background: #fbf3e2; } .hw-kind-paper::after { background: #8a6312; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.hw-kind-mtc { background: #e8f1fa; } .hw-kind-mtc::after { background: #2b6cb0; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.hw-main { flex: 1; min-width: 0; }
.hw-main strong { display: block; color: var(--ink); line-height: 1.35; }
.hw-main small { display: block; color: var(--muted); margin-top: 3px; }
.hw-due { font-size: .86rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.hw-due.is-late { color: var(--coral); }
.hw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hw-students { align-items: flex-start; }
.hw-filter small { opacity: .7; margin-left: 2px; }
@media (max-width: 860px) {
  .hw-row { flex-wrap: wrap; }
  .hw-main { flex-basis: calc(100% - 60px); }
  .hw-due { margin-left: 54px; }
  .st-bell { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) { .st-bell svg, .st-bell-count, .st-bell-panel, .hw-row { animation: none !important; } }

/* ---------- footer line (sign-in, profile, every studio page) */
.mt-foot { font-size: .78rem; color: var(--muted); text-align: center; line-height: 1.5; padding: 0 12px; }
.auth-main .mt-foot { margin-top: 8px; }
.prof-wrap .mt-foot { margin-top: 26px; }
.st-main .mt-foot { margin: 40px 0 0; padding: 18px 12px 26px; border-top: 1px solid var(--line); }

/* ---------- vocabulary builder */
.st-ic[data-icon="vocab"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V6a2 2 0 0 1 2-2h9l5 5v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z'/%3E%3Cpath d='M8 15l2.5-6 2.5 6M8.8 13h3.4M15 11h3M15 15h3'/%3E%3C/svg%3E"); }
.vx-hero { padding: 26px 28px; background: linear-gradient(135deg, #fff 0%, #f6f4ee 100%); border-top: 4px solid var(--violet); }
.vx-hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.vx-kicker { font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sun); }
.vx-hero h2 { font-size: 1.6rem; margin-top: 4px; }
.vx-sub { color: var(--muted); margin-top: 4px; }
.vx-go { background: var(--violet); color: #fff; }
.vx-today { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.vx-tile { position: relative; display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; cursor: pointer; font: inherit; color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s; animation: mtFadeUp .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
.vx-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(20, 40, 72, .1); border-color: #c9d2df; }
.vx-tile-text strong { display: block; font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); }
.vx-tile-text small { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; line-height: 1.4; }
.vx-tile.is-learned { border-color: #b9dcc8; }
.vx-tick { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--go); }
.vx-tick::after { content: ''; position: absolute; left: 7px; top: 4px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* concept illustrations */
.vx-illus { position: relative; flex-shrink: 0; width: 120px; height: 120px; border-radius: 22px; display: grid; place-items: center; overflow: hidden; background: var(--vxbg, #e9eef7); color: var(--vxfg, #1f3a68); }
.vx-illus svg { position: relative; z-index: 2; width: 54%; height: 54%; animation: vxFloat 4s ease-in-out infinite; }
.vx-illus-letter { position: absolute; right: -6%; bottom: -22%; font-family: var(--font-display); font-weight: 700; font-size: 6.5rem; line-height: 1; opacity: .09; }
.vx-illus-dot { position: absolute; border-radius: 50%; background: currentColor; opacity: .12; }
.vx-illus-dot.d1 { width: 34%; height: 34%; left: -8%; top: -8%; }
.vx-illus-dot.d2 { width: 14%; height: 14%; right: 14%; top: 12%; animation: vxFloat 3s ease-in-out infinite reverse; }
.vx-illus-dot.d3 { width: 9%; height: 9%; left: 18%; bottom: 14%; }
.vx-illus.is-sm { width: 64px; height: 64px; border-radius: 16px; }
.vx-illus.is-sm .vx-illus-letter { font-size: 3.4rem; }
.vx-illus.is-lg { width: 220px; height: 220px; border-radius: 28px; }
.vx-illus.is-lg .vx-illus-letter { font-size: 11rem; }
@keyframes vxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5%); } }
.vx-c-happy { --vxbg: #fdf5dc; --vxfg: #9b7a10; } .vx-c-sad { --vxbg: #e8f1fa; --vxfg: #2b6cb0; } .vx-c-angry { --vxbg: #fbeaea; --vxfg: #a33232; }
.vx-c-fear { --vxbg: #fbf0e4; --vxfg: #9a5a17; } .vx-c-brave { --vxbg: #e9eef7; --vxfg: #1f3a68; } .vx-c-think { --vxbg: #efe9f6; --vxfg: #5b3d86; }
.vx-c-speak { --vxbg: #e4f1f1; --vxfg: #1d5c63; } .vx-c-see { --vxbg: #e8f1fa; --vxfg: #2b6cb0; } .vx-c-move { --vxbg: #e5f3ec; --vxfg: #22603f; }
.vx-c-time { --vxbg: #ecebf8; --vxfg: #3f3d8f; } .vx-c-big { --vxbg: #e5f3ec; --vxfg: #22603f; } .vx-c-small { --vxbg: #f6e9ee; --vxfg: #8b3a62; }
.vx-c-help { --vxbg: #fbeaea; --vxfg: #a33232; } .vx-c-nature { --vxbg: #e5f3ec; --vxfg: #22603f; } .vx-c-light { --vxbg: #fdf5dc; --vxfg: #9b7a10; }
.vx-c-sound { --vxbg: #efe9f6; --vxfg: #5b3d86; } .vx-c-work { --vxbg: #eceff3; --vxfg: #3a4658; } .vx-c-change { --vxbg: #e4f1f1; --vxfg: #1d5c63; }
.vx-c-together { --vxbg: #e9eef7; --vxfg: #1f3a68; } .vx-c-stop { --vxbg: #fbeaea; --vxfg: #a33232; } .vx-c-rule { --vxbg: #eceff3; --vxfg: #3a4658; }
.vx-c-money { --vxbg: #fbf3e2; --vxfg: #8a6312; } .vx-c-find { --vxbg: #ecebf8; --vxfg: #3f3d8f; } .vx-c-strong { --vxbg: #fbf0e4; --vxfg: #9a5a17; }
.vx-c-rest { --vxbg: #e8f1fa; --vxfg: #2b6cb0; } .vx-c-book { --vxbg: #f6f4ee; --vxfg: #1f3a68; }

.vx-test { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vx-test strong { display: block; font-family: var(--font-display); font-size: 1.15rem; }
.vx-test span { color: var(--muted); font-size: .9rem; }
.vx-test.is-ready { border-left: 4px solid var(--violet); padding-left: 14px; }
.vx-test.is-late { border-left-color: var(--coral); }
.vx-h { font-size: 1.2rem; margin: 6px 0 12px; }
.vx-h-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.vx-h-note { color: var(--muted); font-size: .85rem; }
.vx-games { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.vx-game { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: transform .15s, box-shadow .15s; }
.vx-game:hover:not(.is-off) { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(20, 40, 72, .1); }
.vx-game.is-off { opacity: .55; cursor: not-allowed; }
.vx-game strong { font-size: 1rem; color: var(--ink); }
.vx-game small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.vx-game-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--vxbg); color: var(--vxfg); }
.vx-game-ic svg { width: 26px; height: 26px; }
.vx-wall { display: flex; flex-wrap: wrap; gap: 8px; }
.vx-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: 500 .9rem var(--font-body); color: var(--ink); }
.vx-chip:hover { border-color: var(--violet); }
.vx-chip.m3 { background: #e5f3ec; border-color: #b9dcc8; }
.vx-stars { display: inline-flex; gap: 2px; }
.vx-stars i { width: 7px; height: 7px; border-radius: 50%; background: #d8dee8; }
.vx-stars i.on { background: var(--gold); }
.vx-tips ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 8px; color: var(--ink-soft); line-height: 1.5; }
.vx-tips h2 { font-size: 1.1rem; }

.vx-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.vx-progress { flex: 1; min-width: 120px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.vx-progress span { display: block; height: 100%; background: var(--violet); transition: width .4s ease; }
.vx-points { font-weight: 600; color: var(--violet); }
.vx-card { display: flex; gap: 32px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 30px; box-shadow: 0 14px 34px rgba(20, 40, 72, .07); animation: mtFadeUp .5s cubic-bezier(.2, .8, .2, 1) both; }
.vx-card-body { flex: 1; min-width: 0; }
.vx-word-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.vx-word { font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.05; }
.vx-pos { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--sun); background: var(--sun-soft); padding: 3px 9px; border-radius: 999px; }
.vx-say { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 6px; }
.vx-block { margin-top: 18px; }
.vx-label { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.vx-meaning { font-size: 1.25rem; color: var(--ink); line-height: 1.45; }
.vx-sentence { font-size: 1.1rem; color: var(--ink-soft); line-height: 1.55; font-style: italic; }
.vx-sentence mark, .vx-big mark { background: #fbf0c9; color: inherit; padding: 0 3px; border-radius: 4px; font-style: normal; font-weight: 600; }
.vx-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.vx-explain { background: var(--violet); color: #fff; display: inline-flex; align-items: center; gap: 10px; }
.vx-play { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent currentColor; display: inline-block; }
.vx-own textarea { width: 100%; font-size: 1rem; padding: 10px 12px; resize: vertical; }
.vx-own-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.vx-own-msg { font-size: .86rem; color: var(--go-deep); }
.vx-next { display: flex; justify-content: flex-end; margin-top: 18px; }
.vx-next .btn { background: var(--violet); color: #fff; }
.vx-next { gap: 10px; flex-wrap: wrap; }
.vx-next .vx-prev { background: #fff; color: var(--violet); border: 1px solid var(--line); }
.vx-hero-btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* explainer "video" */
.vx-modal, .mv-modal { position: fixed; inset: 0; z-index: 200; background: rgba(9, 16, 32, .72); display: grid; place-items: center; padding: 18px; animation: mtFadeIn .2s ease both; }
.vx-player { width: min(860px, 100%); background: #0f1d36; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 70px rgba(0, 0, 0, .45); }
.vx-stage { aspect-ratio: 16 / 9; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #23457a, #0f1d36 70%); color: #fff; padding: 28px; }
.vx-scene { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; animation: vxScene .6s cubic-bezier(.2, .8, .2, 1) both; }
.vx-scene h2 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.2rem); }
.vx-scene .vx-label { color: #d4a52a; }
.vx-big { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 2.1rem); line-height: 1.35; max-width: 34ch; color: #fff; }
.vx-scene .vx-illus.is-lg { width: 160px; height: 160px; }
.vx-scene .vx-pos { background: rgba(255, 255, 255, .12); color: #f2d27a; }
@keyframes vxScene { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.vx-controls { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #0b1528; }
.vx-ctl { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; font-size: .9rem; }
.vx-ctl:hover { background: rgba(255, 255, 255, .22); }
.vx-scrub { flex: 1; display: flex; gap: 6px; }
.vx-scrub span { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .18); cursor: pointer; overflow: hidden; }
.vx-scrub span b { display: block; height: 100%; width: 0; background: #d4a52a; }
.vx-scrub span.is-done b { width: 100%; }
.vx-scrub span.is-now b { animation: vxBar 5s linear forwards; }
@keyframes vxBar { to { width: 100%; } }

/* questions and games */
.vx-q { padding: 28px; animation: mtFadeUp .35s cubic-bezier(.2, .8, .2, 1) both; }
.vx-q-prompt { font-size: 1.25rem; color: var(--ink); line-height: 1.5; }
.vx-q-sent { display: block; margin-top: 10px; font-style: italic; color: var(--ink-soft); }
.vx-gap { display: inline-block; min-width: 80px; border-bottom: 2px solid var(--violet); color: transparent; }
.vx-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.vx-opt { padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fff; text-align: left; font: 500 1rem var(--font-body); color: var(--ink); cursor: pointer; transition: border-color .15s, background-color .15s, transform .12s; }
.vx-opt:hover { border-color: #b9c4d4; transform: translateY(-1px); }
.vx-opt.is-ok { border-color: var(--go); background: var(--go-soft); }
.vx-opt.is-no { border-color: var(--coral); background: var(--coral-soft); }
.vx-q-spell { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.vx-q-hint { color: var(--muted); font-size: .88rem; }
.vx-spell-form { display: flex; gap: 10px; margin-top: 14px; }
.vx-spell-form input { flex: 1; font-size: 1.2rem; padding: 12px 14px; letter-spacing: .04em; }
.vx-spell-form input.is-ok { border-color: var(--go); background: var(--go-soft); }
.vx-spell-form input.is-no { border-color: var(--coral); background: var(--coral-soft); }
.vx-fb { margin-top: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 1px; }
.vx-fb.is-ok, .vx-fb.is-no { padding: 12px 14px; border-radius: var(--r-md); animation: mtFadeUp .25s ease both; }
.vx-fb.is-ok { background: var(--go-soft); color: var(--go-deep); }
.vx-fb.is-no { background: var(--coral-soft); color: #8d2626; }
.vx-fb span { flex: 1; min-width: 200px; color: var(--ink-soft); }
.vx-fb .btn { background: var(--violet); color: #fff; }
.vx-result { text-align: center; padding: 30px; animation: mtFadeUp .4s ease both; }
.vx-res-stars { display: flex; justify-content: center; gap: 10px; margin-bottom: 10px; }
.vx-res-score { font-size: 1.3rem; font-weight: 600; color: var(--violet); margin-top: 6px; }
.vx-res-facts { display: flex; justify-content: center; gap: 22px; margin: 14px 0; color: var(--ink-soft); flex-wrap: wrap; }
.vx-res-list { list-style: none; padding: 0; margin: 14px auto; max-width: 560px; text-align: left; display: grid; gap: 6px; }
.vx-res-list li { padding: 8px 12px; border-radius: var(--r-sm); background: #f6f8fb; border-left: 4px solid var(--go); }
.vx-res-list li.is-no { border-left-color: var(--coral); }
.vx-res-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.vx-match { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px; }
.vx-col { display: grid; gap: 10px; align-content: start; }
.vx-m { padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fff; font: 600 1rem var(--font-body); color: var(--ink); cursor: pointer; text-align: left; transition: all .15s; }
.vx-m.is-mean { font-weight: 500; font-size: .92rem; }
.vx-m.is-picked { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.vx-m.is-done { border-color: var(--go); background: var(--go-soft); color: var(--go-deep); opacity: .7; cursor: default; }
.vx-m.is-no { border-color: var(--coral); background: var(--coral-soft); animation: mtShake .35s ease; }
.vx-lightning { padding: 28px; text-align: center; }
.vx-timer { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; margin-bottom: 26px; }
.vx-timer span { display: block; height: 100%; background: linear-gradient(90deg, var(--coral), var(--sun), var(--go)); transition: width .2s linear; }
.vx-lq { display: grid; gap: 6px; justify-items: center; min-height: 130px; align-content: center; }
.vx-lq strong { font-family: var(--font-display); font-size: 2.2rem; color: var(--ink); }
.vx-lq span { color: var(--muted); }
.vx-lq em { font-size: 1.2rem; color: var(--ink-soft); max-width: 40ch; }
.vx-lq.is-ok { animation: vxFlashOk .4s ease; } .vx-lq.is-no { animation: mtShake .35s ease; }
@keyframes vxFlashOk { 50% { transform: scale(1.04); } }
.vx-tf { display: flex; justify-content: center; gap: 14px; margin-top: 20px; }
.vx-tf .btn { min-width: 140px; font-size: 1.05rem; padding: 14px 20px; color: #fff; }
.vx-true { background: var(--go); } .vx-false { background: var(--coral); }

/* phrases and in-app videos */
.vx-phrases, .mv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.vx-phrase, .mv-tile { display: flex; flex-direction: column; gap: 6px; padding: 0 0 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; overflow: hidden; text-align: left; cursor: pointer; font: inherit; color: inherit; transition: transform .15s, box-shadow .15s; }
.vx-phrase:hover, .mv-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(20, 40, 72, .12); }
.vx-phrase strong, .vx-phrase small { padding: 0 12px; }
.vx-phrase strong { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); }
.vx-phrase small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.vx-phrase.is-seen strong::after { content: ' ✓'; color: var(--go); }
.vx-thumb, .mv-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #0f1d36 center / cover no-repeat; }
.vx-thumb .vx-play, .mv-play { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(15, 29, 54, .78); }
.vx-thumb .vx-play { border: 0; }
.vx-thumb .vx-play::after, .mv-play::after { content: ''; position: absolute; left: 18px; top: 14px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent #fff; }
.mv-len { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .72); color: #fff; font-size: .72rem; padding: 2px 6px; border-radius: 4px; }
.mv-meta { padding: 0 12px; display: block; }
.mv-meta strong { display: block; font-size: .9rem; color: var(--ink); line-height: 1.35; }
.mv-meta small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.lv-side .mv-tiles { grid-template-columns: 1fr; }
.vx-more { margin-top: 10px; }
.mv-box { width: min(920px, 100%); background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px rgba(0, 0, 0, .45); }
.mv-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; }
.mv-head strong { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.mv-head small { color: var(--muted); font-size: .8rem; }
.mv-close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1rem; }
.mv-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.mv-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mv-frame video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.mv-box:has(.mv-frame video) { width: min(1120px, 100%); transition: box-shadow .8s ease; }
.mv-box.mv-ambient { overflow: visible; }
.mv-frame.mv-ctl-on { overflow: hidden; border-radius: 0; user-select: none; }
.mv-frame.mv-ctl-on:fullscreen { aspect-ratio: auto; display: grid; place-items: center; background: #000; }
.mv-frame.mv-ctl-on:fullscreen video { position: static; width: 100%; height: 100%; object-fit: contain; }
.mv-ctl { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-body, system-ui, sans-serif); color: #fff; }
.mv-ctl svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.mv-ctl button { font: inherit; color: inherit; }
.mv-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 12px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); pointer-events: auto; transition: opacity .25s; }
.mv-frame.mv-idle .mv-bar { opacity: 0; pointer-events: none; }
.mv-frame.mv-idle { cursor: none; }
.mv-scrub { position: relative; height: 16px; cursor: pointer; touch-action: none; display: flex; align-items: center; outline-offset: 2px; }
.mv-rail { position: relative; width: 100%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); transition: height .12s; }
.mv-scrub:hover .mv-rail, .mv-scrub:focus-visible .mv-rail { height: 6px; }
.mv-buf { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 255, 255, .35); border-radius: 2px; width: 0; }
.mv-played { position: absolute; left: 0; top: 0; bottom: 0; background: #ff2d2d; border-radius: 2px; width: 0; }
.mv-cue { position: absolute; top: -3px; width: 4px; height: 10px; margin-left: -2px; background: #ffd43b; border-radius: 2px; }
.mv-knob { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #ff2d2d; transform: scale(0); transition: transform .12s; }
.mv-scrub:hover .mv-knob, .mv-scrub:focus-visible .mv-knob { transform: scale(1); }
.mv-tip { position: absolute; bottom: 22px; transform: translateX(-50%); background: rgba(0, 0, 0, .85); padding: 3px 8px; border-radius: 4px; font-size: 13px; pointer-events: none; }
.mv-row { display: flex; align-items: center; gap: 4px; padding-top: 2px; }
.mv-b { width: 40px; height: 40px; padding: 8px; border: 0; background: none; cursor: pointer; border-radius: 8px; opacity: .92; }
.mv-b:hover, .mv-b:focus-visible { opacity: 1; background: rgba(255, 255, 255, .16); }
.mv-speedbtn { width: auto; min-width: 46px; padding: 0 8px; font-weight: 700; font-size: 15px; }
.mv-fill { flex: 1; }
.mv-time { font-size: 14px; margin: 0 8px; white-space: nowrap; opacity: .95; }
.mv-volwrap { display: flex; align-items: center; }
.mv-vol { width: 0; opacity: 0; transition: width .15s, opacity .15s; accent-color: #fff; height: 4px; }
.mv-volwrap:hover .mv-vol, .mv-vol:focus-visible { width: 72px; opacity: 1; margin-right: 6px; }
.mv-sleepchip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; background: rgba(255, 255, 255, .16); border-radius: 12px; padding: 2px 8px 2px 4px; }
.mv-sleepchip svg { width: 18px; height: 18px; }
.mv-bigplay { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; padding: 18px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); cursor: pointer; pointer-events: auto; opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s; }
.mv-frame.mv-paused .mv-bigplay { opacity: 1; transform: none; }
.mv-frame.mv-paused.mv-hasreveal .mv-bigplay { display: none; }
.mv-toast { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); background: rgba(0, 0, 0, .78); padding: 8px 16px; border-radius: 20px; font-size: 16px; font-weight: 600; }
.mv-toast[hidden], .mv-menu[hidden], .mv-tip[hidden], .mv-sleepchip[hidden] { display: none; }
.mv-menu { position: absolute; right: 12px; bottom: 64px; width: 300px; max-width: calc(100% - 24px); max-height: calc(100% - 90px); overflow-y: auto; padding: 8px 0; border-radius: 12px; background: rgba(28, 28, 28, .94); backdrop-filter: blur(6px); pointer-events: auto; box-shadow: 0 8px 28px rgba(0, 0, 0, .5); }
.mv-mi, .mv-mh { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 16px; border: 0; background: none; text-align: left; cursor: pointer; font-size: 15px; }
.mv-mi:hover, .mv-mh:hover, .mv-mi:focus-visible, .mv-mh:focus-visible { background: rgba(255, 255, 255, .12); }
.mv-mh { border-bottom: 1px solid rgba(255, 255, 255, .15); font-weight: 600; margin-bottom: 4px; }
.mv-mh svg { width: 22px; height: 22px; }
.mv-ic { width: 24px; height: 24px; flex: none; }
.mv-ml { flex: 1; }
.mv-mv { opacity: .75; font-size: 14px; }
.mv-mv sup { font-size: 9px; }
.mv-ch { width: 20px; height: 20px; flex: none; opacity: .75; }
.mv-sw { position: relative; width: 36px; height: 14px; border-radius: 7px; background: rgba(255, 255, 255, .35); flex: none; transition: background .15s; }
.mv-sw::after { content: ''; position: absolute; left: 0; top: -3px; width: 20px; height: 20px; border-radius: 50%; background: #aaa; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); transition: transform .15s, background .15s; }
.mv-sw.on { background: rgba(255, 255, 255, .55); }
.mv-sw.on::after { transform: translateX(16px); background: #fff; }
.mv-reveal { z-index: 3; }
@media (max-width: 640px) {
  .mv-time { font-size: 12px; margin: 0 4px; }
  .mv-b { width: 34px; height: 34px; padding: 6px; }
  .mv-speedbtn { width: auto; min-width: 38px; padding: 0 4px; font-size: 13px; }
  .mv-volwrap { display: none; }
  .mv-menu { right: 6px; bottom: 56px; }
}
.mv-own .mv-meta small { color: #8a6a1f; font-weight: 600; }
.mv-own .mv-thumb { background-color: #142848; }
.mv-reveal { position: absolute; left: 50%; bottom: 19%; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 16px; padding: 14px 18px 14px 22px; border-radius: 14px; background: rgba(20, 40, 72, .94); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); max-width: 92%; }
.mv-reveal[hidden] { display: none; }
.mv-reveal p { margin: 0; font-size: 16px; line-height: 1.35; }
.mv-reveal p strong { display: block; font-size: 18px; color: #ffd43b; }
.mv-reveal button { border: 0; border-radius: 10px; padding: 10px 18px; background: #ffd43b; color: #142848; font-weight: 800; font-size: 17px; cursor: pointer; white-space: nowrap; }
.mv-caption { padding: 12px 16px 0; color: var(--ink-soft); line-height: 1.5; }
.mv-foot { padding: 10px 16px 14px; font-size: .82rem; }
.mv-foot a { color: var(--muted); }

.vx-tutor { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.vx-tutor strong { font-size: 1.15rem; color: var(--ink); }
.vx-tutor-own { margin-top: 14px; }
.vx-tutor-own ul { margin: 0; padding-left: 18px; color: var(--ink-soft); display: grid; gap: 4px; }

@media (max-width: 900px) {
  .vx-today { grid-template-columns: 1fr; }
  .vx-games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vx-card { flex-direction: column; align-items: center; padding: 20px; gap: 18px; }
  .vx-illus.is-lg { width: 150px; height: 150px; }
  .vx-opts { grid-template-columns: 1fr; }
  .vx-match { grid-template-columns: 1fr 1fr; gap: 8px; }
  .vx-tutor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .vx-illus svg, .vx-illus-dot, .vx-tile, .vx-card, .vx-scene, .vx-q { animation: none !important; } }

/* ---------- registration and invitations */
.auth-hint { font-size: .78rem; color: var(--muted); margin: 5px 0 0; }
.auth-switch { margin-top: 16px; font-size: .88rem; color: var(--ink-soft); text-align: center; }
.tt-link { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.tt-link input { flex: 1 1 320px; min-width: 0; font-size: .9rem; padding: 10px 12px; background: #f6f8fb; }
.tt-link-note { margin-top: 14px; color: var(--ink-soft); font-size: .9rem; }
.tt-inv { margin-top: 16px; }
.tt-inv-act { white-space: nowrap; text-align: right; }
.tt-inv-act .btn + .btn { margin-left: 6px; }
.tt-profile dl:has(> div:nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.auth-card.is-welcome { border-top-color: var(--go); animation: mtFadeUp .5s cubic-bezier(.2, .8, .2, 1) both; }
.auth-card.is-welcome .auth-kicker { color: var(--go-deep); }

/* ---------- topic search */
.tp-search { position: relative; flex: 1 1 280px; max-width: 420px; margin-left: auto; }
.tp-search input { width: 100%; height: 42px; padding: 0 14px 0 40px; border: 1px solid #d5dbe4; border-radius: var(--r-md); background: #fff; font: 500 .95rem var(--font-body); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.tp-search input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(31, 58, 104, .16); }
.tp-search-ic { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; background: #8592a6; pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tp-res-count { color: var(--muted); margin: 0 0 12px; font-size: .92rem; }
.tp-res { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tp-res-item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; text-align: left; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; animation: mtFadeUp .3s ease both; }
.tp-res-item:hover { border-color: #c3ccda; box-shadow: 0 6px 16px rgba(20, 40, 72, .08); transform: translateY(-1px); }
.tp-res-main { flex: 1; min-width: 0; }
.tp-res-main strong { display: block; color: var(--ink); font-size: 1rem; }
.tp-res-main small { display: block; color: var(--muted); margin-top: 3px; font-size: .84rem; }
.tp-res mark { background: #fbf0c9; color: inherit; border-radius: 3px; padding: 0 2px; }
@media (max-width: 860px) { .tp-search { max-width: none; margin-left: 0; flex-basis: 100%; } }

/* ---------- Play & Learn */
.st-ic[data-icon="play-learn"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='7' width='19' height='11' rx='5.5'/%3E%3Cpath d='M7 10.5v4M5 12.5h4'/%3E%3Ccircle cx='15.5' cy='11' r='1' fill='black'/%3E%3Ccircle cx='17.5' cy='14' r='1' fill='black'/%3E%3C/svg%3E"); }
.pg-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 24px 28px; background: linear-gradient(135deg, #fff 0%, #f1f4fa 100%); border-top: 4px solid var(--violet); }
.pg-hero h2 { font-size: 1.6rem; margin-top: 4px; }
.pg-hero-stats { display: flex; gap: 22px; color: var(--ink-soft); }
.pg-hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--violet); }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pg-card { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; cursor: pointer; font: inherit; color: inherit; overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s; animation: mtFadeUp .45s cubic-bezier(.2, .8, .2, 1) both; }
.pg-card::before { content: ''; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--pgbg); opacity: .7; transition: transform .3s; }
.pg-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(20, 40, 72, .12); border-color: #c9d2df; }
.pg-card:hover::before { transform: scale(1.25); }
.pg-card > * { position: relative; }
.pg-card-ic { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: var(--pgbg); color: var(--pgfg); }
.pg-card-ic svg { width: 28px; height: 28px; }
.pg-card-tag { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--pgfg); margin-top: 6px; }
.pg-card strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.pg-card small { color: var(--muted); line-height: 1.45; font-size: .86rem; }
.pg-card-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; font-size: .78rem; color: var(--ink-soft); border-top: 1px solid var(--line); }
.pg-navy { --pgbg: #e9eef7; --pgfg: #1f3a68; } .pg-teal { --pgbg: #e4f1f1; --pgfg: #1d5c63; } .pg-amber { --pgbg: #fbf3e2; --pgfg: #8a6312; }
.pg-rose { --pgbg: #fbeaea; --pgfg: #a33232; } .pg-green { --pgbg: #e5f3ec; --pgfg: #22603f; } .pg-blue { --pgbg: #e8f1fa; --pgfg: #2b6cb0; } .pg-plum { --pgbg: #efe9f6; --pgfg: #5b3d86; }
.pg-stage { min-height: 300px; }
.pg-pb { display: inline-block; background: var(--go-soft); color: var(--go-deep); font-weight: 700; padding: 6px 14px; border-radius: 999px; margin-bottom: 8px; animation: mtPop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.pg-summary { color: var(--ink-soft); margin-top: 6px; }
.pg-details { margin: 12px auto 0; max-width: 620px; text-align: left; }

/* tutor: one student's year group & content */
.tt-access .tt-year { grid-column: 1 / -1; align-items: center; gap: 12px; }
.tt-access .tt-year small { color: var(--muted); font-size: .84rem; }
.tt-access .tt-sub { display: contents; }
.tt-access .tt-sub[hidden] { display: none; }
.tt-pick { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; }
.tt-pick summary { cursor: pointer; font-weight: 600; }
.tt-pick summary small { font-weight: 500; color: var(--muted); margin-left: 8px; }
.tt-pick[open] summary { margin-bottom: 10px; }
.tt-students > summary { list-style: none; cursor: pointer; margin-bottom: 0; align-items: center; }
.tt-students > summary::-webkit-details-marker { display: none; }
.tt-students > summary h2 small { font-size: .8rem; font-weight: 600; color: var(--muted); margin-left: 6px; }
.tt-students > summary p { display: flex; align-items: center; gap: 6px; }
.tt-students > summary .st-ic { transition: transform .15s; }
.tt-students[open] > summary .st-ic { transform: rotate(90deg); }
.tt-students .tt-hide, .tt-students[open] .tt-show { display: none; }
.tt-students[open] .tt-hide { display: inline; }
.tt-students[open] > summary { margin-bottom: 8px; }
.tt-unlock { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: .85rem; color: var(--muted); cursor: pointer; }
.tt-unlock[hidden] { display: none; }
.hw-what option[data-set] { color: #9aa3b2; }
.tt-copy-from { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; margin-bottom: 14px; border: 1px dashed var(--line); border-radius: var(--r-md); }
.tt-copy-from label { font-weight: 600; font-size: .9rem; }
.tt-copy-from .st-select { width: auto; min-width: 200px; }
.tt-copy-from small { flex-basis: 100%; color: var(--muted); }
.tt-students-note { color: var(--muted); font-size: .85rem; margin-bottom: 10px; }
.tt-pick-search { width: 100%; margin: 10px 0 8px; }
.tt-pick-list { max-height: 280px; overflow: auto; display: grid; gap: 2px; }
.tt-pick-row { display: flex; gap: 10px; align-items: center; padding: 5px 6px; border-radius: 8px; font-size: .9rem; cursor: pointer; }
.tt-pick-row:hover { background: var(--violet-soft); }
.tt-pick-row input { accent-color: var(--violet); }

/* flagged for later */
.st-flag.is-on { color: var(--violet); border-color: var(--violet); background: var(--violet-soft); }
#testFlag { margin-top: 6px; }
.pp-flag { color: var(--violet); margin-right: 6px; }

/* set texts library (library-view.js) */
.lib-intro p { color: var(--ink-soft); margin-top: 6px; max-width: 70ch; }
.lib-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.lib-book { display: flex; gap: 16px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: var(--r-lg); padding: 18px; cursor: pointer; font: inherit; color: inherit; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s; }
.lib-book:hover { border-color: #c9d2de; transform: translateY(-1px); }
.lib-spine { width: 46px; min-height: 64px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; color: #fff; background: var(--violet); }
.lib-spine.lib-play { background: #7a2e3a; }
.lib-spine.lib-poetry { background: #2f6b55; }
.lib-spine.lib-novel { background: #2c4a6f; }
.lib-spine.lib-novella { background: #5a3c75; }
.lib-book-text { display: grid; gap: 4px; align-content: start; min-width: 0; }
.lib-book-text .st-pill { justify-self: start; }
.lib-book-text strong { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.25; }
.lib-book-text small { color: var(--ink-soft); }
.lib-blurb { font-size: .86rem; color: var(--ink-soft); }
.lib-go { margin-top: 6px; font-size: .86rem; font-weight: 600; color: var(--violet); }
.lib-closed p { color: var(--ink-soft); margin: 6px 0 12px; max-width: 70ch; }
.lib-closed ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lib-closed li { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); background: #f6f8fb; }
.lib-closed li span { font-size: .84rem; color: var(--ink-soft); }

.lib-reader { display: grid; gap: 16px; max-width: 860px; }
.lib-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; position: sticky; top: 8px; z-index: 5; }
.lib-pick { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-soft); min-width: 0; }
.lib-pick span { white-space: nowrap; }
.lib-pick select { font: inherit; font-size: .9rem; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--ink); max-width: 260px; }
.lib-find { display: flex; gap: 6px; flex: 1; min-width: 220px; }
.lib-find input { flex: 1; min-width: 0; font: inherit; font-size: .9rem; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.lib-find input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.lib-size { display: flex; gap: 4px; }
.lib-bar .btn { padding: 7px 12px; font-size: .86rem; }
.lib-results { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; max-height: 340px; overflow: auto; }
.lib-res-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.lib-results ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.lib-results li button { display: grid; gap: 2px; width: 100%; text-align: left; border: none; background: none; padding: 8px; border-radius: var(--r-sm); cursor: pointer; font: inherit; font-size: .88rem; color: var(--ink); }
.lib-results li button:hover { background: #f3f5f8; }
.lib-res-sec { font-size: .74rem; font-weight: 600; color: var(--violet); text-transform: uppercase; letter-spacing: .03em; }
.lib-reader mark { background: #fbe9a6; color: inherit; border-radius: 2px; padding: 0 1px; }

.lib-page { padding: 28px 34px 34px; }
.lib-page-head { margin-bottom: 18px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.lib-kicker { font-size: .78rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.lib-page-head h2 { font-size: 1.6rem; margin-top: 4px; }
.lib-by { color: var(--ink-soft); margin-top: 4px; font-style: italic; }
.lib-body { font-family: var(--font-display); font-size: var(--lib-size, 1.02rem); line-height: 1.75; color: var(--ink); max-width: 68ch; }
.lib-body p { margin: 0 0 1em; }
.lib-kind-novella .lib-body p + p { text-indent: 1.4em; }
.lib-h { font-size: 1.1em; margin: 1.4em 0 .6em; }
.lib-sd { font-style: italic; color: var(--ink-soft); }
.lib-speech { margin: 0 0 1em; }
.lib-sp { font-family: var(--font-body); font-size: .74em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--violet); margin-bottom: 2px; }
.lib-speech p { margin: 0 0 .4em; }
.lib-speech .lib-sd { margin-top: .2em; }
.lib-line { white-space: pre-wrap; position: relative; }
.lib-kind-poetry .lib-body { padding-left: 2.8em; }
.lib-stanza { margin: 0 0 1.2em; }
.lib-ln { position: absolute; left: -4em; width: 2.6em; text-align: right; top: 0; font-family: var(--font-body); font-size: .7em; color: var(--muted); line-height: 2.5; }
.lib-pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lib-pager .btn { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-end { font-size: .9rem; color: var(--ink-soft); align-self: center; }
@media (max-width: 640px) {
  .lib-page { padding: 20px 18px 24px; }
  .lib-bar { position: static; }
  .lib-pick { width: 100%; }
  .lib-pick select { flex: 1; min-width: 0; max-width: none; }
  .lib-find { min-width: 0; width: 100%; }
  .lib-pager .btn { max-width: 100%; width: 100%; }
}

/* cards from feature modules (hooks.js) and mastery levels */
.hook-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.hook-card { min-width: 0; display: grid; }
.hook-card.is-wide { grid-column: 1 / -1; }
.hook-card > .st-card { height: 100%; }
.set-extra { margin-top: 14px; }
.st-pill.mastery-1 { background: #eef1f5; color: var(--ink-soft); }
.st-pill.mastery-2 { background: #e3f1ea; color: #22643f; }
.st-pill.mastery-3 { background: #fbf0cf; color: #7a5a00; }
.prog-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* review batch 1 (23 Oct 2026) */
.st-pill { font-size: .8125rem; }
/* dashboard: one "Up next" card first, Daily 5 beside it */
.dash-upnext { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: stretch; }
.dash-upnext:has(> .dash-up-side[hidden]) { grid-template-columns: 1fr; }
.dash-up-main { background: #f5f7fb; border-left: 4px solid var(--violet); }
.dash-up-kicker { font-size: .85rem; font-weight: 700; color: var(--violet); margin-bottom: 4px; }
.dash-up-main h2 { font-size: 1.4rem; line-height: 1.25; }
.dash-up-sub { color: var(--ink-soft); margin-top: 6px; }
.dash-up-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.dash-up-side { display: grid; }
.dash-up-side > .hook-card > .st-card { height: 100%; }
@media (max-width: 860px) { .dash-upnext { grid-template-columns: 1fr; } }
/* topic lists: a labelled mastery chip */
.tp-mastery { font-size: .8125rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: #f1f3f7; color: var(--ink-soft); white-space: nowrap; flex-shrink: 0; }
.tp-mastery.mastery-1 { background: #e9eef7; color: #1f3a68; }
.tp-mastery.mastery-2 { background: #e3f1ea; color: #1f5a3a; }
.tp-mastery.mastery-3 { background: #fbf0cf; color: #6b4e00; }
/* PSHE: a note before personal topics, and where to find help */
.lv-care { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); background: #f6ebf0; border-left: 4px solid #7a2f52; }
.lv-care p { margin-top: 4px; color: var(--ink); }
.lv-help { border-left: 4px solid #7a2f52; }
.lv-help p { margin-top: 8px; color: var(--ink-soft); font-size: .92rem; line-height: 1.55; }
.lv-help a { color: #7a2f52; }
/* primary pupils: slightly larger reading text in lessons and questions */
body.st-primary .lv-sec p, body.st-primary .lv-keyidea, body.st-primary .sub-objectives li, body.st-primary .ex-prompt, body.st-primary .ex-opt { font-size: 1.0625rem; }
.lib-spine .st-ic { width: 26px; height: 26px; }
.tt-access .tt-wide { grid-column: 1 / -1; }
.tt-access .tt-wide[hidden] { display: none; }
.tt-access .tt-limit { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tt-access .tt-limit[hidden] { display: none; }
.tt-access .tt-limit-name { min-width: 150px; font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.tt-access .tt-limit-gap { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.tt-access .tt-wide-note { flex-basis: 100%; color: var(--muted); font-size: .84rem; }

/* ==========================================================================
   GCSE Revision Pathways (gcse-pathway.js)
   ========================================================================== */
.gpw { display: grid; gap: 16px; }
.gpw-tabs { flex-wrap: wrap; }
.gpw-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a5a1f; margin: 0 0 4px; }
.gpw-intro { display: flex; gap: 24px; align-items: center; justify-content: space-between; }
.gpw-intro h2 { margin: 0 0 6px; }
.gpw-intro p { margin: 0 0 6px; max-width: 640px; }
.gpw-board { color: var(--ink-soft); font-size: .9rem; }
.gpw-l { color: #1f3a68; } .gpw-p { color: #22603f; } .gpw-t { color: #8a5a1f; }
.gpw-meter { min-width: 190px; display: grid; gap: 4px; text-align: right; }
.gpw-meter b { font-size: 1.8rem; line-height: 1; color: var(--ink); }
.gpw-meter b small { font-size: 1rem; color: var(--ink-soft); }
.gpw-meter span { color: var(--ink-soft); font-size: .85rem; }
.gpw-join, .gpw-next, .gpw-dash { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.gpw-join h2, .gpw-next h2, .gpw-dash h2 { margin: 0 0 4px; font-size: 1.1rem; }
.gpw-join p, .gpw-next p, .gpw-dash p { margin: 0; color: var(--ink-soft); }
.gpw-join { border: 1px solid #d4a52a; background: #fbf6e8; }
.gpw-status:empty { display: none; }
.gpw-status { margin-top: 6px !important; color: #8a5a1f !important; }
.gpw-next { background: linear-gradient(120deg, #142848, #1f3a68); color: #fff; border: 0; }
.gpw-next h2 { color: #fff; } .gpw-next p { color: rgba(255,255,255,.85); } .gpw-next .gpw-kicker { color: #f0cf73; }
.gpw-next .btn { background: #d4a52a; color: #142848; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; }
.gpw-next .btn .st-ic { width: 14px; height: 14px; }
.gpw-next.is-done { background: var(--go-soft); color: var(--go-deep); } .gpw-next.is-done h2, .gpw-next.is-done p { color: var(--go-deep); }
.gpw-filters { gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-start; }
.gpw-filter-note { color: var(--ink-soft); font-size: .88rem; }
.gpw-units { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gpw-unit > summary { grid-template-columns: 34px minmax(0, 1fr) 150px 22px; gap: 14px; }
.gpw-unit-n { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #1f3a68; background: #e9eef7; }
.gpw-exam p { color: var(--ink-soft); margin: 6px 0 12px; }
.gpw-note-sm { font-size: .9rem; }
.gpw-dash-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #e9eef7; color: #1f3a68; flex-shrink: 0; }
.gpw-dash > div:nth-child(2) { flex: 1; }
.gpw-dash-go { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 300px; }
@media (max-width: 700px) {
  .gpw-intro, .gpw-join, .gpw-next, .gpw-dash { flex-direction: column; align-items: stretch; }
  .gpw-meter { text-align: left; }
  .gpw-dash-go { justify-content: flex-start; max-width: none; }
  .gpw-unit > summary { grid-template-columns: 34px minmax(0, 1fr) 22px; }
}

/* phones: the page title gets its own full-width row under the menu and icons (it was squeezed to one word a line) */
@media (max-width: 600px) {
  .st-top { flex-wrap: wrap; row-gap: 10px; }
  .st-heading { order: 10; flex: 1 0 100%; }
  .st-top-actions { margin-left: auto; }
  .st-top-actions .btn { white-space: nowrap; }
  /* GCSE pathway: never wider than the phone */
  .gpw, .gpw > * { min-width: 0; }
  .gpw-tabs { display: flex; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .gpw-tabs button { flex: 0 0 auto; }
  .gpw-filters .st-tabs { max-width: 100%; overflow-x: auto; }
}

/* a website link to a course that is not on the account (studio.js "addcourse") */
.ac-card { max-width: 640px; }
.ac-card h2 { margin: 0 0 6px; }
.ac-card p { color: var(--ink-soft); margin: 0 0 12px; }
.ac-status:empty { display: none; }
.ac-btns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 600px) { .sp-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; } .sp-tabs button { flex: 0 0 auto; } }

/* lesson side column: extra resources folded under "More help" (lesson-view.js) */
.lv-more { padding: 0; overflow: hidden; }
.lv-more > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 2px 10px; align-items: center; padding: 16px 18px; cursor: pointer; }
.lv-more > summary::-webkit-details-marker { display: none; }
.lv-more > summary span { font-weight: 700; }
.lv-more > summary small { grid-column: 1; color: var(--muted); font-size: .82rem; }
.lv-more > summary .st-ic { grid-row: 1 / span 2; grid-column: 2; color: var(--muted); transition: transform .2s; }
.lv-more[open] > summary .st-ic { transform: rotate(90deg); }
.lv-more-sec { padding: 4px 18px 16px; border-top: 1px solid var(--line); }
.lv-more-sec h2 { font-size: 1rem; margin: 12px 0 2px; }

/* GCSE pathway and topic lists never wider than a phone (long one-line objectives) */
.gpw-units { grid-template-columns: minmax(0, 1fr); }
.gpw-units > li, .tp-topics > *, .tp-subs > li, .tp-sub-main { min-width: 0; }
.tp-sub-main small { overflow: hidden; text-overflow: ellipsis; }
#testFlag { margin-right: 4px; }
