/* EduAdapt-Hybrid · дизайн-система v1.0 «Стекло, сдержанно» (docs/design.md).
   Стекло только у меню, содержимое на ровных белых карточках. Шрифт Inter встроен файлами, без внешних сервисов. */

@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter-cyrillic-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- 2. Цвета ---------- */
:root {
  --bg: #EEF2F5; --tint: #DCE8EF; --surface: #FFFFFF; --border: #E1E6EB; --divider: #EDF0F3;
  --text: #16232E; --text-2: #33424E; --muted: #4A5A68; --muted-glass: #3E4F5D;
  --primary: #155E83; --primary-hover: #0E4561; --primary-soft: #E4EEF4; --on-primary: #FFFFFF;
  --focus: #B0472A; --focus-text: #A3401F; --goal: #2F7D4E; --neutral: #6F8AA0; --track: #E9EEF2;
  --danger-soft: #FBEDE8; --danger-text: #8A3218; --hint-soft: #FBF5E8; --hint-text: #6E5112;
  --chart-bg: #F7F9FA; --tag-bg: #F1F4F7; --pre-bar: #C9D4DD;
  --lv1-bg: #F6DED4; --lv1-tx: #8A3218; --lv2-bg: #F5E8CC; --lv2-tx: #6E5112; --lv3-bg: #E4EEF4; --lv3-tx: #155E83;
  --lv4-bg: #B5D3E3; --lv4-tx: #0E3A52; --lv5-bg: #155E83; --lv5-tx: #FFFFFF;
  --glass: rgba(255, 255, 255, .58); --glass-edge: rgba(255, 255, 255, .75); --glass-on: rgba(255, 255, 255, .85);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 4px 16px rgba(22, 60, 90, .06);
  --fs: 15px; --tap: 40px; --side: 244px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
  color-scheme: light;
}
:root.dark {
  --bg: #0F161D; --tint: #142230; --surface: #18212A; --border: #26323D; --divider: #202A34;
  --text: #E6EBF0; --text-2: #C3CDD6; --muted: #A3B1BD; --muted-glass: #A3B1BD;
  --primary: #6CB8E0; --primary-hover: #8FCBEA; --primary-soft: #1D3442; --on-primary: #0F161D;
  --focus: #E8957A; --focus-text: #E8957A; --goal: #5CC28A; --neutral: #7F97AB; --track: #26323D;
  --danger-soft: #3A2219; --danger-text: #F2B7A3; --hint-soft: #332A17; --hint-text: #EBD29A;
  --chart-bg: #141C24; --tag-bg: #222D37; --pre-bar: #3A4B59;
  --lv1-bg: #4A2519; --lv1-tx: #F6C9B8; --lv2-bg: #46391C; --lv2-tx: #F1DCA6; --lv3-bg: #1D3442; --lv3-tx: #A9D4EC;
  --lv4-bg: #2D5F7C; --lv4-tx: #E6F2F9; --lv5-bg: #6CB8E0; --lv5-tx: #0F161D;
  --glass: rgba(24, 33, 42, .72); --glass-edge: rgba(255, 255, 255, .08); --glass-on: rgba(108, 184, 224, .16);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 4px 16px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
/* Режим доски: только светлая тема, стекло плотнее, фон без пятна, всё ×1,25. */
:root.board { zoom: 1.25; --glass: rgba(255, 255, 255, .85); --tap: 48px; }

/* ---------- основа ---------- */
* { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--text); line-height: 1.55; font-size: 15px;
  background: radial-gradient(900px 600px at 0% 0%, var(--tint) 0%, transparent 70%), var(--bg); background-attachment: fixed; }
:root.board body { background: var(--bg); }
h1, h2, h3 { margin: 0; color: var(--text); text-wrap: balance; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: 16px; font-weight: 600; line-height: 1.3; }
h3 { font-size: 15px; font-weight: 600; line-height: 1.35; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
b, strong { font-weight: 600; }
small { font-size: 13px; color: var(--muted); }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.s { width: 16px; height: 16px; } .ic.b { stroke-width: 2; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.nl { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .t2 { color: var(--text-2); } .ft { color: var(--focus-text); } .gt { color: var(--goal); } .pt { color: var(--primary); }
.n { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- оболочка: меню из стекла ---------- */
.app { display: flex; min-height: 100vh; padding: 16px; }
.side { position: sticky; top: 16px; align-self: flex-start; width: var(--side); height: calc(100vh - 32px); flex: none; display: flex; flex-direction: column; gap: 26px;
  padding: 20px 8px 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%); z-index: 5; }
:root.board .side { height: calc(80vh - 32px); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: var(--text); }
.brand .ic { width: 22px; height: 22px; color: var(--primary); stroke-width: 2.2; }
.nav { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 10px; border-radius: 10px; color: var(--muted-glass); line-height: 1.3; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .4); }
.nav a.on { color: var(--primary); font-weight: 600; background: var(--glass-on); box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(22, 60, 90, .10); }
:root.dark .nav a.on { box-shadow: none; } :root.dark .nav a:hover { background: rgba(255, 255, 255, .05); }
.nav a.on .ic { stroke-width: 2; }
.nav .nl { display: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding: 0 12px; }
.langs { display: flex; align-items: center; gap: 14px; color: var(--muted-glass); }
.langs button { border: 0; background: none; font: inherit; font-size: 15px; color: var(--muted-glass); padding: 4px 0; cursor: pointer; min-height: 32px; }
.langs button.on { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted-glass); line-height: 1.4; }
.who b { color: var(--text); }
.tools { display: flex; gap: 4px; margin: 0 -8px; }
.tools button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--muted-glass); cursor: pointer; }
.tools button:hover { background: rgba(255, 255, 255, .5); color: var(--text); }
.tools button.on { color: var(--primary); background: var(--glass-on); }
main { flex: 1; min-width: 0; max-width: 1240px; padding: 10px 4px 32px 28px; display: flex; flex-direction: column; gap: 16px; }
main:focus { outline: none; }
.mtop, .mnav { display: none; }

/* Заголовок экрана */
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.phead > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.meta { display: flex; flex-wrap: wrap; margin-left: -16px; clip-path: inset(0 0 0 16px); font-size: 13px; color: var(--muted); line-height: 1.5; }
.meta > span { position: relative; padding-left: 16px; max-width: 100%; }
.meta > span::before { content: "·"; position: absolute; left: 0; width: 16px; text-align: center; }
.meta.cr > span::before { content: "›"; }
.meta.lg { font-size: 14px; }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--hint-soft); color: var(--hint-text); font-size: 14px; }

/* ---------- карточки и сетки ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.card.tight { gap: 8px; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-h > div { min-width: 0; }
.sub { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.lbl-f { font-size: 14px; font-weight: 600; color: var(--focus-text); }
.lbl-p { font-size: 14px; font-weight: 600; color: var(--primary); }
.out { font-size: 24px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; text-wrap: balance; }
.txt { font-size: 15px; color: var(--text-2); line-height: 1.55; }
.txt b { color: var(--text); }
.sm { font-size: 13px; } .s14 { font-size: 14px; }
.hr { border: 0; border-top: 1px solid var(--divider); margin: 0; }
.foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--divider); }
.g { display: grid; gap: 16px; align-items: stretch; }
.g > * { min-width: 0; }
.g2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.g21 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g12 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); }
.g-path { grid-template-columns: 380px minmax(0, 1fr); }
.g-recs { grid-template-columns: 320px minmax(0, 1fr); }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col > .grow { flex: 1; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row.sb { justify-content: space-between; }
.row.end { justify-content: flex-end; }

/* Полоса показателей (KPI) в одной карточке, ячейки через тонкую линию */
.strip { padding: 0; flex-direction: row; gap: 0; }
.strip > div { flex: 1; padding: 18px 22px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.strip > div + div { border-left: 1px solid var(--divider); }
.strip small { font-size: 13px; color: var(--muted); }
.strip .v { font-size: 24px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.strip .v span { font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.strip .v .up { color: var(--primary); }

/* ---------- кнопки и поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 20px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; line-height: 1.25; cursor: pointer; text-align: center; }
.btn:hover { border-color: #C9D2DA; color: var(--text); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.btn.lg { min-height: 48px; padding: 12px 22px; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; font-weight: 500; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.lnk { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--primary); padding: 10px 4px; cursor: pointer; min-height: var(--tap); }
.lnk:hover { color: var(--primary-hover); }
.lnk .ic { width: 16px; height: 16px; stroke-width: 2; transition: transform .15s; }
.lnk[aria-expanded="true"] .ic { transform: rotate(180deg); }
.inp { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; padding: 10px 14px; }
.inp:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
textarea.inp { resize: vertical; line-height: 1.55; min-height: 96px; }
textarea.ans { min-height: 170px; }
.inp-code { font-size: 17px; letter-spacing: .06em; }
select.inp { width: auto; min-height: 36px; padding: 4px 10px; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); }
.field > b { font-size: 14px; font-weight: 600; }
.seg { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg button { flex: 1; min-height: 42px; border: 0; background: none; font: inherit; font-size: 15px; color: var(--text); cursor: pointer; padding: 0 12px; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.seg.small button { min-height: 34px; font-size: 13px; flex: none; padding: 0 12px; }

/* Метки */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--tag-bg); color: var(--text-2); }
.chip.lv1 { background: var(--lv1-bg); color: var(--lv1-tx); } .chip.lv2 { background: var(--lv2-bg); color: var(--lv2-tx); }
.chip.lv3 { background: var(--lv3-bg); color: var(--lv3-tx); } .chip.lv4 { background: var(--lv4-bg); color: var(--lv4-tx); }
.chip.lv5 { background: var(--lv5-bg); color: var(--lv5-tx); }
.chip.ok { background: var(--lv4-bg); color: var(--lv4-tx); } .chip.warn { background: var(--lv2-bg); color: var(--lv2-tx); } .chip.bad { background: var(--lv1-bg); color: var(--lv1-tx); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--tag-bg); color: var(--text-2); font-size: 13px; white-space: nowrap; }

/* Подсказка и ошибка: единственные цветные подложки внутри карточки */
.hint { display: flex; gap: 12px; padding: 14px 16px; border-radius: 10px; background: var(--hint-soft); color: var(--hint-text); font-size: 14px; line-height: 1.55; }
.hint .ic { margin-top: 2px; }
.hint b { color: inherit; }
.err { padding: 12px 16px; border-radius: 10px; background: var(--danger-soft); color: var(--danger-text); font-size: 14px; line-height: 1.5; }

/* Списки со строками через линию */
.list > li, .list > a, .list > button { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--divider); min-width: 0; }
.list > :last-child { border-bottom: 0; }
.list > a, .list > button { color: var(--text); width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; font: inherit; cursor: pointer; }
.list > a:hover b, .list > button:hover b { color: var(--primary); }
.list .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.list .grow b { font-size: 15px; font-weight: 600; }
.list .ic { color: var(--text-2); }
.list .end { margin-left: auto; font-size: 14px; color: var(--muted); white-space: nowrap; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; font-size: 14px; }
.kv > * { padding: 7px 0; border-bottom: 1px solid var(--divider); }
.kv > :nth-last-child(-n+2) { border-bottom: 0; }
.kv dt { color: var(--text-2); } .kv dd { margin: 0; text-align: right; font-weight: 600; padding-left: 12px; }
.facts { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-2); }
.facts li { display: flex; gap: 10px; line-height: 1.45; }
.facts .ic { color: var(--primary); margin-top: 1px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); line-height: 1.4; padding: 3px 0; }
.checks .ic { width: 16px; height: 16px; color: var(--primary); stroke-width: 2.2; margin-top: 1px; }
.checks .wait .ic { color: var(--muted); stroke-width: 1.8; }
.checks .no .ic { color: var(--focus); }

/* Таблицы */
.scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--divider); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .n { padding-right: 0; padding-left: 10px; }
.tbl th.n { text-align: right; }
.tbl tbody tr[data-act] { cursor: pointer; }
.tbl tbody tr[data-act]:hover td { background: var(--chart-bg); }
.tbl td small { display: block; }

/* Вкладки (сегменты внутри карточки) */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tabs button { min-height: 36px; padding: 6px 12px; border-radius: 10px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; }
.tabs button:hover { color: var(--text); background: var(--tag-bg); }
.tabs button.on { color: var(--primary); background: var(--primary-soft); font-weight: 600; }

/* ---------- 01 Вход ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 64px; align-items: center; max-width: 1120px; margin: 0 auto; padding: 40px 48px; }
.login-hero { display: flex; flex-direction: column; gap: 22px; }
.login-hero h1 { font-size: 36px; line-height: 1.17; letter-spacing: -.02em; max-width: 560px; }
.login-hero .txt { max-width: 540px; }
.login-hero .author { font-size: 13px; color: var(--muted); }
.login-card { padding: 30px 32px; gap: 20px; }
.login-card h2 { font-size: 20px; font-weight: 700; }
.roles { display: flex; flex-direction: column; }
.roles button { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border: 0; border-bottom: 1px solid var(--divider); background: none; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.roles button:last-child { border-bottom: 0; }
.roles b { display: block; font-size: 15px; } .roles small { display: block; }
.radio { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #8A99A6; margin-top: 2px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); }
.on > .radio, [aria-checked="true"] > .radio { border-color: var(--primary); }
.on > .radio::after, [aria-checked="true"] > .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.login-note { font-size: 13px; color: var(--muted); text-align: center; }
.login-top { position: fixed; top: 0; left: 0; right: 0; padding: 12px; z-index: 3; }

/* ---------- 02 Главная ---------- */
.step-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--text-2); }
.step-meta span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.step-meta .ic { width: 16px; height: 16px; }
.big-n { display: flex; align-items: baseline; gap: 10px; font-size: 15px; color: var(--text-2); }
.big-n b { font-size: 36px; font-weight: 700; color: var(--text); letter-spacing: -.02em; line-height: 1.1; }
.segs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.segs i { height: 10px; border-radius: 2px; background: var(--neutral); }
.segs i.g { background: var(--goal); } .segs i.f { background: var(--focus); }

/* ---------- уровни по компетенциям (полоски) ---------- */
.lvl { display: flex; flex-direction: column; }
.lvl > div { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(60px, 1fr) 44px; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--divider); font-size: 14px; line-height: 1.35; }
.lvl > div:last-child { border-bottom: 0; }
.lvl .v { text-align: right; font-weight: 700; }
.lvl .f { color: var(--focus-text); font-weight: 600; }
.lvl .f + .tr + .v { color: var(--focus-text); }
.tr { position: relative; height: 8px; border-radius: 2px; background: var(--track); }
.tr > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--neutral); }
.tr > i.g { background: var(--goal); } .tr > i.f { background: var(--focus); } .tr > i.p { background: var(--primary); }
.tr > em { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--goal); box-shadow: 0 0 0 1.5px var(--surface); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--neutral); }
.legend i.f { background: var(--focus); } .legend i.g { background: var(--goal); } .legend i.p { background: var(--primary); } .legend i.pre { background: var(--pre-bar); }
.legend i.tick { width: 2px; height: 12px; border-radius: 0; background: var(--goal); }
.legend i.line { width: 16px; height: 2px; border-radius: 0; background: var(--goal); }

/* «Где помощь нужнее всего» */
.hbars { display: flex; flex-direction: column; font-size: 14px; }
.hbars > div { display: grid; grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) 44px; gap: 12px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--divider); }
.hbars > div:last-child { border-bottom: 0; }
.hbars i { display: block; height: 8px; border-radius: 2px; background: var(--neutral); }
.hbars .f { color: var(--focus-text); font-weight: 600; } .hbars .f i, .hbars i.f { background: var(--focus); }
.hbars .v { text-align: right; }
.hbars .f .v, .hbars .v.f { font-weight: 700; color: var(--focus-text); }

/* ---------- 05 Траектория ---------- */
.plan { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--text-2); }
.plan li { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.plan li.cur { color: var(--primary); font-weight: 700; }
.plan li.done { color: var(--text-2); }
.plan li.done .ic { color: var(--primary); stroke-width: 2.2; }
.plan-bar { display: none; }
.how { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--divider); }
.how .formula { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.how .formula b { color: var(--text); }
.how .formula b.pt { color: var(--primary); }
.sheet-close { display: none; }
.fc { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 340px); gap: 28px; align-items: center; padding: 8px 8px 8px 28px; }
.fc > div:first-child { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; }
.fc .txt { font-size: 14px; }
.chart-box { align-self: stretch; display: flex; align-items: center; background: var(--chart-bg); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.chart-box svg { display: block; width: 100%; }
.chain { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; font-size: 14px; line-height: 1.45; }
.chain li { border-top: 3px solid var(--primary); padding-top: 10px; }
.chain li.last { border-top-color: var(--focus); }
.chain b { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.chain b .ic { width: 16px; height: 16px; color: var(--primary); stroke-width: 2; }
.chain li.last b .ic { color: var(--focus); }
.chain span { color: var(--text-2); }

/* ---------- 03 Диагностика, тесты ---------- */
.progress { display: flex; flex-direction: column; gap: 6px; }
.progress .row { font-size: 13px; color: var(--muted); }
.pbar { height: 8px; border-radius: 2px; background: #DFE5EA; overflow: hidden; }
:root.dark .pbar { background: var(--track); }
.pbar i { display: block; height: 100%; background: var(--primary); border-radius: 2px; }
.q-n { font-size: 13px; color: var(--muted); }
.q-t { font-size: 20px; font-weight: 600; line-height: 1.35; text-wrap: balance; }
.opts { display: flex; flex-direction: column; }
.opt { display: flex; align-items: center; gap: 14px; padding: 12px 0; min-height: 48px; border: 0; border-bottom: 1px solid var(--divider); background: none; font: inherit; font-size: 15px; color: var(--text); text-align: left; cursor: pointer; width: 100%; }
.opt:last-child { border-bottom: 0; }
.opt .L { width: 16px; font-weight: 600; color: var(--muted); }
.opt[aria-checked="true"] { font-weight: 600; }
.opt.right { color: var(--goal); font-weight: 600; } .opt.wrong { color: var(--focus-text); }
.opt:disabled { cursor: default; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 14px; background: var(--chart-bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; overflow-x: auto; margin: 0; }
.dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.dots button { min-height: 30px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; padding: 0; }
.dots button.ok { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.dots button.cur { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.cmap > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--divider); font-size: 14px; }
.cmap > div:last-child { border-bottom: 0; }
.cmap .cur { color: var(--primary); font-weight: 600; }
.score { display: flex; align-items: baseline; gap: 8px; }
.score b { font-size: 36px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.score span { font-size: 15px; color: var(--text-2); }

/* ---------- 04 Обучение ---------- */
.steps-top { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--text-2); }
.steps-top button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 6px 0; min-height: 36px; white-space: nowrap; }
.steps-top button.cur { color: var(--primary); font-weight: 700; }
.steps-top .ic { width: 16px; height: 16px; color: var(--primary); stroke-width: 2.2; }
.crit > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.crit .bad { color: var(--focus-text); font-weight: 600; }
.crit b { font-weight: 700; }
.prose { display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.6; color: var(--text-2); max-width: 760px; }
.prose h2 { font-size: 18px; }
.prose ul { list-style: disc; padding-left: 1.3em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.demo-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--divider); }
.ok-line { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--goal); font-weight: 600; line-height: 1.45; }
.ok-line .ic { stroke-width: 2.2; margin-top: 1px; }
details.more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--primary); min-height: var(--tap); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .ic { width: 16px; height: 16px; stroke-width: 2; transition: transform .15s; }
details.more[open] > summary .ic { transform: rotate(180deg); }
details.more > div { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.mech h3 { font-size: 14px; margin-bottom: 4px; }

/* ---------- 06 Прогресс ---------- */
.radar-w { display: flex; justify-content: center; }
.radar-w svg { width: 100%; max-width: 500px; height: auto; }
.lvls > div { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--divider); font-size: 14px; line-height: 1.45; }
.lvls > div:last-child { border-bottom: 0; }
.lvls small { display: block; margin-top: 4px; }
.was { font-size: 14px; }
.was > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--divider); }
.was > div:last-child { border-bottom: 0; }

/* ---------- 07 Мотивация ---------- */
.lik { display: flex; flex-direction: column; }
.lik5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.lik5 button { min-height: 40px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font: inherit; font-size: 14px; color: var(--text-2); cursor: pointer; }
.lik5 button.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); font-weight: 600; }
.sa-row { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--divider); font-size: 14px; }
.sa-row:last-child { border-bottom: 0; }

/* ---------- 08 и 09 Преподаватель ---------- */
.attn > button { padding: 12px 0; }
.attn .code { all: unset; font-weight: 700; font-size: 14px; width: 54px; flex: none; }
.attn .ic.chev { color: var(--muted); width: 16px; height: 16px; }
.rec-bar { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
.rec-bar > div:first-child { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rec-bar .row { flex: none; }
.queue { padding: 20px 8px 12px; }
.queue h2 { padding: 0 8px; }
.queue > .qi { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--text); width: 100%; }
.queue > .qi:hover { background: var(--chart-bg); }
.queue > .qi.on { background: var(--primary-soft); }
.queue > .qi.on b { color: var(--primary); }
.queue .qi > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.queue .qi small { font-size: 13px; }
.queue .qi b { font-size: 14px; line-height: 1.35; }
.queue .ic { color: var(--muted); width: 16px; height: 16px; }
.st-ok { color: var(--goal); font-weight: 600; } .st-no { color: var(--muted); }
.why5 > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--divider); font-size: 14px; line-height: 1.5; }
.why5 > div:last-child { border-bottom: 0; }
.why5 dt { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.why5 dt .ic { width: 16px; height: 16px; color: var(--primary); stroke-width: 2; }
.why5 dd { margin: 0; color: var(--text-2); }
.heat { display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(30px, 1fr)); gap: 2px; font-size: 12px; }
.heat .hc { min-height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 3px; font-weight: 600; }
.heat .hh { font-weight: 600; color: var(--muted); }
.heat .hl { justify-content: flex-start; font-weight: 700; color: var(--text); cursor: pointer; }
.heat .l1 { background: var(--lv1-bg); color: var(--lv1-tx); } .heat .l2 { background: var(--lv2-bg); color: var(--lv2-tx); } .heat .l3 { background: var(--lv3-bg); color: var(--lv3-tx); }
.heat .l4 { background: var(--lv4-bg); color: var(--lv4-tx); } .heat .l5 { background: var(--lv5-bg); color: var(--lv5-tx); }
.spark { width: 80px; height: 24px; vertical-align: middle; }
.reports > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.reports > div:last-child { border-bottom: 0; }
.reports b { display: block; font-size: 15px; }
.reports p { font-size: 14px; color: var(--text-2); }

/* ---------- 10 Исследователь ---------- */
.chart { display: block; width: 100%; height: auto; }
.chart text { font-family: inherit; fill: var(--muted); font-size: 12px; }
.chart text.b { fill: var(--text); font-weight: 600; }
.chart text.f { fill: var(--focus-text); }
.chart text.gl { fill: var(--goal); }
.chart text.pl { fill: var(--primary); font-weight: 600; }

/* ---------- параметры, научная база ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.pgrid .field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.libnav > button { padding: 10px 12px; border-radius: 10px; border: 0; background: none; font: inherit; font-size: 14px; text-align: left; cursor: pointer; color: var(--text-2); display: flex; gap: 10px; width: 100%; }
.libnav > button.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.libnav > button:hover { background: var(--chart-bg); }

/* ---------- пустое состояние ---------- */
.empty { align-items: flex-start; }
.empty .ic { width: 28px; height: 28px; color: var(--primary); }

/* ---------- сценарий показа ---------- */
.scen { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow), 0 8px 28px rgba(22, 60, 90, .12); -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%); z-index: 20; max-width: calc(100vw - 32px); }
.scen .scen-t { display: flex; flex-direction: column; min-width: 200px; max-width: 460px; padding: 0 8px; }
.scen .scen-t small { font-size: 12px; } .scen .scen-t b { font-size: 14px; line-height: 1.35; }
.scen button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; flex: none; }
.scen button.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.scen button:disabled { opacity: .4; cursor: default; }
.scen button.start { width: auto; padding: 0 22px; gap: 10px; font: inherit; font-size: 16px; font-weight: 600; background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.scen button.x { border: 0; background: none; color: var(--muted); }
:root.board .scen { bottom: 12px; }
:root.board .scen button { width: 56px; height: 56px; }
:root.board .scen button.start { width: auto; padding: 0 26px; font-size: 18px; }
:root.board .scen .scen-t b { font-size: 16px; }
.has-scen main { padding-bottom: 110px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; transition: .2s; z-index: 30; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.pop { position: absolute; right: 12px; top: 52px; z-index: 30; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 28px rgba(22, 60, 90, .14); display: flex; flex-direction: column; }
.pop button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; text-align: left; }
.pop button:hover { background: var(--chart-bg); }

/* ---------- 8. Адаптивность ---------- */
/* Узкий ПК: правая колонка уходит вниз раньше, чем на планшете */
@media (max-width: 1180px) {
  .g-path { grid-template-columns: 340px minmax(0, 1fr); }
  .fc { gap: 20px; padding-left: 22px; }
}
/* Планшет: меню становится узкой полосой 92 px, карточки в одну колонку, главная карточка первой */
@media (max-width: 1060px) {
  :root { --side: 92px; }
  .side { padding: 18px 6px 14px; gap: 18px; align-items: stretch; }
  .side .brand { justify-content: center; padding: 0; } .side .brand span { display: none; }
  .nav a { flex-direction: column; gap: 4px; padding: 10px 2px; font-size: 12px; text-align: center; min-height: 60px; justify-content: center; }
  .nav a .ic { width: 20px; height: 20px; }
  .nav .nf { display: none; } .nav .nl { display: block; } .who .nl { display: inline; }
  .side-foot { padding: 0; align-items: center; text-align: center; gap: 10px; }
  .langs { flex-direction: column; gap: 0; }
  .langs button:not(.on) { display: none; }
  .langs button.on { text-decoration: none; font-size: 13px; }
  .who { flex-direction: column; gap: 4px; font-size: 12px; text-align: center; }
  .who .wr, .who .wd { display: none; }
  .tools { flex-direction: column; margin: 0; align-items: center; }
  main { padding-left: 22px; }
  .g2, .g21, .g12, .g-path, .g-recs { grid-template-columns: minmax(0, 1fr); }
  .first { order: -1; }
  .chain { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .chain li { border-top: 0; padding: 10px 0 10px 28px; border-bottom: 1px solid var(--divider); position: relative; }
  .chain li:last-child { border-bottom: 0; }
  .chain b .ic { position: absolute; left: 0; top: 13px; }
  .chain li.last b .ic { color: var(--focus); }
  .login { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 620px; padding: 32px 24px; }
  .login-hero h1 { font-size: 30px; }
  .rec-bar { flex-direction: column; align-items: stretch; }
}
/* Телефон: нижняя стеклянная панель из иконок, сверху строка с языком и кодом, только главное */
@media (max-width: 700px) {
  .app { display: block; padding: 0 0 92px; }
  .side { display: none; }
  .mtop { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 4px; position: relative; }
  .mtop .brand { padding: 0; font-size: 15px; } .mtop .brand .ic { width: 20px; height: 20px; }
  .mtop .brand span { display: inline; }
  .mtop .r { display: flex; align-items: center; gap: 4px; font-size: 14px; }
  .mtop .r button { border: 0; background: none; font: inherit; color: var(--muted-glass); cursor: pointer; min-height: 40px; padding: 0 6px; }
  .mtop .r .l { color: var(--primary); font-weight: 700; }
  .mtop .r .c b { color: var(--text); }
  .mnav { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 10; justify-content: space-around; padding: 6px; border-radius: 16px;
    background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow), 0 6px 20px rgba(22, 60, 90, .10); -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%); }
  .mnav a { flex: 1; display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 12px; color: var(--muted-glass); }
  .mnav a .ic { width: 22px; height: 22px; }
  .mnav a.on { color: var(--primary); background: var(--glass-on); box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(22, 60, 90, .10); }
  main { padding: 8px 16px 16px; gap: 14px; max-width: none; }
  h1 { font-size: 24px; }
  .card { padding: 18px 18px; }
  .out { font-size: 21px; }
  .btn { min-height: 48px; }
  .card .btn.primary.main { width: 100%; }
  .card.strip { padding: 0; flex-wrap: wrap; }
  .strip > div { flex: 1 1 50%; padding: 14px 16px; }
  .strip > div:nth-child(odd) { border-left: 0; }
  .strip > div:nth-child(n+3) { border-top: 1px solid var(--divider); }
  .strip .v { font-size: 21px; }
  .ph-hide { display: none !important; }
  .fc { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px 8px 8px; }
  .fc > div:first-child { padding: 0 10px; }
  .plan { display: none; }
  .plan-bar { display: flex; flex-direction: column; gap: 8px; }
  .plan-bar .bars { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 4px; }
  .plan-bar .bars i { height: 4px; border-radius: 2px; background: var(--track); }
  .plan-bar .bars i.on { background: var(--primary); }
  .plan-bar p { font-size: 14px; color: var(--text-2); }
  .plan-bar p b { color: var(--primary); }
  .dec-act { flex-direction: column; align-items: stretch !important; }
  .dec-act .lnk { justify-content: center; }
  /* «Как посчитано» на телефоне: нижняя шторка поверх экрана */
  .how.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 80vh; overflow: auto; padding: 22px 18px 28px; border-radius: 16px 16px 0 0; background: var(--surface); border-top: 0; box-shadow: 0 -8px 32px rgba(22, 60, 90, .18); }
  .how.sheet .sheet-close { display: flex; justify-content: space-between; align-items: center; }
  .shade { position: fixed; inset: 0; background: rgba(15, 22, 29, .35); z-index: 39; }
  .hbars > div { grid-template-columns: minmax(0, 1fr) 70px 40px; }
  .lvl > div { grid-template-columns: minmax(0, 1fr) 96px 40px; }
  .why5 > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .lvls > div { grid-template-columns: 120px minmax(0, 1fr); }
  .sa-row { grid-template-columns: minmax(0, 1fr); }
  .login { padding: 24px 16px 40px; }
  .login-hero h1 { font-size: 26px; }
  .login-hero .facts, .login-hero .author { display: none; }
  .login-card { padding: 22px 18px; }
  .scen { bottom: 84px; left: 12px; right: 12px; transform: none; }
  .scen .scen-t { min-width: 0; flex: 1; }
  .has-scen main { padding-bottom: 96px; }
  .q-t { font-size: 18px; }
  .dots { grid-template-columns: repeat(8, 1fr); }
  .tbl { font-size: 13px; }
  .phead { align-items: flex-start; }
}
@media (hover: none) { .nav a:hover, .btn:hover, .tabs button:hover { background: inherit; } }
@media print { .side, .mnav, .mtop, .scen { display: none; } .app { padding: 0; } main { padding: 0; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* 05 Траектория: сетка по областям, порядок на планшете: решение, прогноз, рассуждение, уровни */
.path-grid { grid-template-columns: 380px minmax(0, 1fr); grid-template-areas: "lv dec" "lv fc" "ch ch"; align-items: stretch; }
.a-lv { grid-area: lv; } .a-dec { grid-area: dec; } .a-fc { grid-area: fc; } .a-ch { grid-area: ch; }
@media (max-width: 1180px) { .path-grid { grid-template-columns: 340px minmax(0, 1fr); } }
@media (max-width: 1060px) { .path-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "dec" "fc" "ch" "lv"; } }

/* Аккаунты (администратор) */
.acc-tbl td small { display: block; color: var(--muted); font-size: 12px; }
.acc-tbl tr.off td { color: var(--muted); }
.acc-act { white-space: nowrap; text-align: right; }
.acc-act .btn + .btn { margin-left: 6px; }
.acc-pw code { font-size: 15px; letter-spacing: .04em; }
.acc-grid { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
.acc-tbl td:first-child { white-space: nowrap; }

/* ИИ-помощник (чат) */
.chat { gap: 14px; }
.chat-log { display: flex; flex-direction: column; gap: 12px; min-height: 240px; max-height: min(62vh, 640px); overflow-y: auto; padding: 4px 2px; }
.msg { display: flex; gap: 10px; align-items: flex-start; max-width: 760px; }
.msg > div { padding: 10px 14px; border-radius: 12px; font-size: 15px; line-height: 1.55; min-width: 0; overflow-wrap: anywhere; }
.msg > div p { margin: 0 0 8px; } .msg > div p:last-child { margin-bottom: 0; }
.msg > div ul, .msg > div ol { margin: 0 0 8px; padding-left: 20px; list-style: disc; }
.msg > div ol { list-style: decimal; }
.msg > div li { margin: 2px 0; padding: 0; display: list-item; }
.msg.me { align-self: flex-end; }
.msg.me > div { background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 4px; }
.msg.ai > svg { flex: none; margin-top: 10px; color: var(--primary); }
.msg.ai > div { background: var(--chart-bg); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.ai.err > div { color: var(--focus-text); }
.msg.wait > div { color: var(--muted); }
.chat-empty { display: flex; flex-direction: column; gap: 12px; padding: 8px 0; }
.chat-empty .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-btn { min-height: 40px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--primary); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.tag-btn:hover { background: var(--chart-bg); }
.chat-in { display: flex; gap: 10px; align-items: flex-end; }
.chat-in textarea { flex: 1; resize: vertical; min-height: 48px; }
.chat-foot { gap: 12px; }
@media (max-width: 700px) { .chat-in { flex-direction: column; align-items: stretch; } .chat-log { max-height: 58vh; } }
