/* Площадка тестов. Токены в стиле пульта Dengiex (exchange-bot/src/dash/static/v2/css/tokens.css). */
:root {
  --bg: #ECEDE7; --surface: #FFFFFF; --surface-2: #F6F6F2; --surface-3: #EEEFE9; --line: #E7E8E1; --line-2: #D8DAD2;
  --ink: #131512; --ink-2: #565A53; --ink-3: #72766E; --ink-4: #B7BAB2;
  --plate: #131512; --plate-2: #262924; --plate-ink: #F4F5EF; --plate-ink-2: #A7AB9F; --plate-line: rgba(244,245,239,.12);
  --accent: #D5F35E; --accent-ink: #12150A; --accent-soft: #EEF9C9; --accent-text: #4D7000;
  --pos: #0E7A3B; --pos-soft: #E2F5E8; --neg: #C8323A; --neg-soft: #FCEBEB; --warn: #965A00; --warn-soft: #FCF1DF;
  --d-executing: #8B7CF6; --d-influencing: #F2A65A; --d-relationship: #5EA8F0; --d-strategic: #6FB58A;
  --f-display: "Geologica", "Onest", system-ui, sans-serif; --f-ui: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-card: 22px; --r-ctl: 14px; --r-sm: 10px; --ease: cubic-bezier(.2,.8,.2,1); --dur: 180ms;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; min-height: 100vh; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.display { font-family: var(--f-display); font-weight: 500; letter-spacing: -.02em; line-height: 1.12; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 13.5px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 16px 16px 72px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.plate { background: var(--plate); color: var(--plate-ink); border-radius: var(--r-card); }
.plate .muted { color: var(--plate-ink-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: var(--r-ctl);
  border: 1px solid transparent; background: var(--plate); color: var(--plate-ink); font-weight: 500; cursor: pointer; text-decoration: none;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease); white-space: nowrap; }
.btn:hover { background: var(--plate-2); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.sec { background: var(--surface); color: var(--ink); border-color: var(--line-2); } .btn.sec:hover { background: var(--surface-2); }
.btn.acc { background: var(--accent); color: var(--accent-ink); } .btn.acc:hover { background: #C4E847; }
.btn.tg { background: #2AABEE; color: #fff; } .btn.tg:hover { background: #1F9AD9; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn.danger { color: var(--neg); border-color: var(--line-2); background: var(--surface); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 12px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.tag.pos { background: var(--pos-soft); color: var(--pos); border-color: transparent; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag.neg { background: var(--neg-soft); color: var(--neg); border-color: transparent; }
.tag.acc { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.tag.d { color: #fff; border-color: transparent; }
.field { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); min-height: 44px; width: 100%; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.notice { padding: 14px 16px; border-radius: var(--r-ctl); background: var(--surface-2); font-size: 14.5px; color: var(--ink-2); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.neg { background: var(--neg-soft); color: var(--neg); }
.notice.pos { background: var(--pos-soft); color: var(--pos); }
.ava { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); color: var(--ink); display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; overflow: hidden; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--plate); color: var(--plate-ink); padding: 12px 18px; border-radius: var(--r-ctl); font-size: 14.5px; z-index: 50; max-width: calc(100vw - 32px); }

/* шапка */
.top { display: flex; align-items: center; gap: 12px; padding: 10px 0 18px; }
.top .brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.top .brand svg { width: 34px; height: 34px; }
.top .spacer { flex: 1; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; font-size: 14.5px; color: var(--ink-2); }
.top nav a.on { background: var(--plate); color: var(--plate-ink); }
.top .user { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.top .user .ava { width: 32px; height: 32px; font-size: 12px; text-transform: uppercase; }
@media (max-width: 600px) { .top .user > span { display: none; } .top .brand { font-size: 15px; } }

/* вход */
.login { display: grid; overflow: hidden; }
.login .l-plate { padding: 28px 24px; display: grid; gap: 22px; align-content: space-between; min-height: 300px; }
.login .l-plate h1 { font-size: 30px; }
.login .l-plate p { max-width: 38ch; }
.login .l-form { padding: 28px 24px; display: grid; gap: 18px; align-content: center; }
.login .l-form h2 { font-size: 20px; font-weight: 600; }
.trust { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r-ctl); background: var(--surface-2); font-size: 14px; color: var(--ink-2); }
.trust b { color: var(--ink); font-weight: 600; }
.rays { width: 128px; height: 128px; }
.tgw { min-height: 48px; display: flex; align-items: center; }
@media (min-width: 860px) {
  .login { grid-template-columns: 1.05fr 1fr; min-height: 440px; }
  .login .l-plate, .login .l-form { padding: 44px; }
  .login .l-plate h1 { font-size: 40px; }
}

/* список тестов */
.tests { display: grid; gap: 12px; }
.test { padding: 20px; display: grid; gap: 12px; }
.test h3 { font-size: 19px; font-weight: 600; }
.test .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.intro { display: grid; gap: 8px; padding-left: 18px; margin: 0; color: var(--ink-2); font-size: 15px; }
@media (min-width: 860px) { .test { grid-template-columns: 1fr auto; align-items: center; padding: 24px 28px; } .test .act { grid-row: span 2; } }

/* вопрос */
.quiz { padding: 18px 16px 22px; display: grid; gap: 18px; }
.q-top { display: flex; align-items: center; gap: 12px; }
.bar { flex: 1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 99px; transition: width 300ms var(--ease); }
.count { font-size: 14px; color: var(--ink-2); }
.timer { position: relative; width: 48px; height: 48px; flex: none; }
.timer svg { width: 48px; height: 48px; transform: rotate(-90deg); }
.timer circle.p { transition: stroke-dashoffset 1s linear; }
.timer.low circle.p { stroke: var(--neg); }
.timer b { position: absolute; inset: 0; display: grid; place-items: center; font: 500 15px var(--f-mono); }
.pair { display: grid; gap: 12px; }
.say { position: relative; padding: 18px 16px 18px 56px; border-radius: var(--r-card); border: 1px solid var(--line-2); background: var(--surface);
  font: 500 18px/1.35 var(--f-ui); min-height: 92px; display: flex; align-items: center; cursor: pointer; text-align: left; width: 100%;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.say em { position: absolute; left: 14px; top: 16px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font: 600 14px var(--f-ui); font-style: normal; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); }
.say:hover { border-color: var(--ink); }
.say.on { border-color: var(--ink); background: var(--accent-soft); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; justify-items: center; gap: 4px; padding: 4px 0; }
.scale button { border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); cursor: pointer; padding: 0;
  transition: transform .12s var(--ease), background-color .12s var(--ease), border-color .12s var(--ease); }
.scale button:nth-child(1), .scale button:nth-child(5) { width: 58px; height: 58px; }
.scale button:nth-child(2), .scale button:nth-child(4) { width: 48px; height: 48px; }
.scale button:nth-child(3) { width: 44px; height: 44px; }
.scale button:hover { border-color: var(--ink); }
.scale button:active { transform: scale(.94); }
.scale button.on { background: var(--accent); border-color: var(--ink); }
.scale-cap { display: grid; grid-template-columns: 1fr auto 1fr; font-size: 13px; color: var(--ink-3); gap: 8px; }
.scale-cap span:last-child { text-align: right; }
.likert { display: grid; gap: 8px; }
.likert button { text-align: left; padding: 12px 14px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; min-height: 48px; }
.likert button.on { background: var(--accent-soft); border-color: var(--ink); }
.pause { padding: 32px 20px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.pause .intro { text-align: left; max-width: 46ch; }
.pause h2 { font-size: 26px; }
.q-note { font-size: 13px; color: var(--ink-3); text-align: center; }
@media (min-width: 860px) {
  .quiz { padding: 32px 40px 36px; gap: 26px; }
  .pair { grid-template-columns: 1fr 1fr; gap: 20px; }
  .say { font-size: 21px; min-height: 150px; padding: 28px 28px 28px 72px; }
  .say em { left: 24px; top: 28px; }
  .scale, .scale-cap { max-width: 520px; margin: 0 auto; width: 100%; }
}

/* отчёт */
.report { display: grid; gap: 16px; }
.r-head { padding: 24px 20px; display: grid; gap: 20px; }
.r-head h2 { font-size: 28px; }
.r-head .who { display: flex; align-items: center; gap: 12px; }
.sun { width: 100%; max-width: 300px; justify-self: center; }
.domains { display: grid; grid-template-columns: 1fr; gap: 10px 24px; font-size: 14px; }
.domains > div { display: flex; align-items: center; gap: 8px; }
.domains i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.domains b { margin-left: auto; white-space: nowrap; font-weight: 500; }
.top5 { display: grid; gap: 10px; }
.theme { padding: 18px 18px 18px 20px; display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; border-left: 4px solid var(--c, var(--line-2)); align-content: start; }
.theme .n { grid-row: span 2; font: 500 34px/1 var(--f-display); letter-spacing: -.02em; min-width: 30px; }
.theme h3 { font: 600 18px/1.3 var(--f-ui); }
.theme small { font-size: 13px; color: var(--ink-3); }
.theme .t-body { grid-column: 1 / -1; display: grid; gap: 12px; margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.theme .t-body h4 { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.theme ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.theme .mgr { padding: 14px 16px; border-radius: var(--r-ctl); background: var(--surface-2); display: grid; gap: 10px; }
.theme .mgr > b { font-size: 13px; color: var(--accent-text); }
.theme details summary { cursor: pointer; color: var(--ink); font-weight: 500; list-style: none; display: flex; align-items: center; gap: 8px; }
.theme details summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform var(--dur) var(--ease); }
.theme details[open] summary::before { transform: rotate(45deg); }
.rank { display: grid; gap: 6px; }
.rank .r { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; font-size: 14.5px; }
.rank .r .bar { height: 8px; background: var(--surface-3); }
.rank .r .bar i { background: var(--c); width: var(--w); }
.rank .r .nm { display: flex; align-items: center; gap: 8px; }
.rank .r.lo { color: var(--ink-3); }
.sect { padding: 20px; display: grid; gap: 12px; }
.sect h3 { font-size: 17px; font-weight: 600; }
.r-send { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px 20px; }
.r-send .txt { flex: 1 1 240px; font-size: 14.5px; color: var(--ink-2); }
@media (min-width: 860px) {
  .r-head { grid-template-columns: 1fr 300px; padding: 40px; align-items: center; }
  .r-head h2 { font-size: 38px; }
  .domains { grid-template-columns: 1fr 1fr; }
  .top5 { grid-template-columns: 1fr 1fr; }
  .top5 .theme:first-child { grid-column: 1 / -1; }
  .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* панель */
.p-layout { display: grid; gap: 16px; }
.list { display: grid; gap: 8px; }
.person { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; }
.person:hover { border-color: var(--line-2); background: var(--surface-2); }
.person .nm { font-weight: 500; }
.person .sub { font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.person .st { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input { font: inherit; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 999px; min-height: 40px; min-width: 200px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 14px; min-height: 36px; }
.chip.on { background: var(--plate); color: var(--plate-ink); border-color: var(--plate); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-weight: 500; color: var(--ink-3); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }
.tbl-wrap { overflow-x: auto; }
.heat { font-size: 12.5px; }
.heat td, .heat th { padding: 6px 8px; white-space: nowrap; }
.heat td.c { text-align: center; font-family: var(--f-mono); }
.heat td.c.t5 { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.heat td.c.t10 { background: var(--surface-2); }
.heat th.sticky, .heat td.sticky { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }
.att { display: grid; gap: 6px; padding: 12px 14px; }
.att .row { justify-content: space-between; }
.modal { position: fixed; inset: 0; background: rgba(19,21,18,.5); display: grid; place-items: center; padding: 16px; z-index: 40; }
.modal .box { background: var(--surface); border-radius: var(--r-card); padding: 24px; width: min(520px, 100%); display: grid; gap: 14px; max-height: 90vh; overflow: auto; }
.modal h3 { font-size: 19px; font-weight: 600; }
.vopt { display: grid; gap: 8px; }
.vopt label { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); cursor: pointer; }
.vopt label:has(input:checked) { border-color: var(--ink); background: var(--accent-soft); }
.vopt input { margin-top: 4px; }
.empty { padding: 36px 20px; text-align: center; color: var(--ink-3); }
.log { font-size: 13.5px; display: grid; gap: 6px; }
.log div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
@media (max-width: 600px) { .log div { grid-template-columns: 1fr; gap: 2px; } }
@media (min-width: 860px) { .p-layout { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* главная */
.home { display: grid; gap: 16px; max-width: 880px; margin: 0 auto; }
.home-panel { padding: 28px 24px; display: grid; gap: 22px; }
.home-panel h1 { font-size: 30px; margin-top: 6px; }
.home-panel .hp-text p { margin-top: 10px; max-width: 56ch; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--plate-line); border-radius: var(--r-ctl); overflow: hidden; }
.stat { background: var(--plate-2); padding: 14px 16px; display: grid; gap: 2px; }
.stat b { font-size: 30px; color: var(--plate-ink); }
.stat span { font-size: 13px; color: var(--plate-ink-2); }
.btn.ghost { background: transparent; color: var(--plate-ink); border-color: var(--plate-line); }
.btn.ghost:hover { background: var(--plate-2); }
.hello { padding: 8px 4px 4px; display: grid; gap: 8px; }
.hello h1 { font-size: 30px; }
.sec-title { font-size: 17px; font-weight: 600; padding: 8px 4px 0; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 2px 12px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-2); font: 600 14px var(--f-ui); }
.steps li span { color: var(--ink-3); font-size: 14.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.empty-state { padding: 40px 24px; display: grid; justify-items: center; gap: 10px; text-align: center; }
.empty-state p { max-width: 44ch; }
.rays.sm { width: 72px; height: 72px; }
@media (min-width: 860px) {
  .home-panel { padding: 40px; grid-template-columns: 1fr 340px; align-items: end; }
  .home-panel .row { grid-column: 1 / -1; }
  .home-panel h1 { font-size: 38px; }
}
