:root {
  --bg: #f6f7f9; --card: #fff; --ink: #1d2433; --muted: #5f6b7a; --line: #dde2e8;
  --accent: #2563eb; --accent-ink: #fff;
  --green: #15803d; --yellow: #b45309; --red: #b91c1c;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; }
.wide { max-width: 1100px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 14px; }
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px; padding: 10px 16px; cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button:disabled { opacity: .5; cursor: default; }
input[type=text], select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; width: 100%; background: #fff; }
div.consent { background: var(--bg); padding: 4px 14px; border-radius: 8px; max-height: 55vh; overflow: auto; line-height: 1.5; }
div.consent h3 { font-size: 16px; margin: 14px 0 4px; }
div.consent p, div.consent ul, div.consent ol { margin: 8px 0; }
div.consent ul, div.consent ol { padding-left: 20px; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.progress > div { height: 100%; background: var(--accent); transition: width .2s; }
.item-text { font-size: 19px; margin: 8px 0 20px; min-height: 3em; }
.options { display: grid; gap: 8px; }
.options button { text-align: left; padding: 14px 16px; }
.options button.chosen { border-color: var(--accent); background: #eff4ff; }
.nav { display: flex; justify-content: space-between; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.zone { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff; }
.zone.green { background: var(--green); } .zone.yellow { background: var(--yellow); } .zone.red { background: var(--red); }
.bar { height: 10px; background: var(--line); border-radius: 5px; position: relative; }
.bar > div { height: 100%; border-radius: 5px; background: var(--accent); }
.bar.weak > div { background: var(--red); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.notice { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.link { word-break: break-all; font-family: ui-monospace, monospace; font-size: 13px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } .hide-sm { display: none; } }

.level { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 13px; }
.level.low { background: #fde8e8; color: #9b1c1c; }
.level.mid { background: #fef3c7; color: #92400e; }
.level.high { background: #e3f6e8; color: #1e6b34; }
.interp { border-left: 4px solid var(--line); padding: 4px 0 4px 12px; margin: 12px 0; }
.interp.low { border-color: #e02424; }
.interp.mid { border-color: #f59e0b; }
.interp.high { border-color: #31a354; }
.interp p { margin: 6px 0; }
.forecast { border: 1px solid var(--line); border-left-width: 6px; border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.forecast.high { border-left-color: #31a354; }
.forecast.mid { border-left-color: #f59e0b; }
.forecast.low { border-left-color: #e02424; }
.forecast-label { font-size: 20px; font-weight: 600; margin: 2px 0 4px; }
.forecast p { margin: 6px 0; }

/* Крупный шрифт для страницы кандидата (тест охранников: часто пожилые кандидаты) */
body.large { font-size: 18px; }
body.large .muted { font-size: 16px; }
body.large h1 { font-size: 26px; }
body.large .item-text { font-size: 22px; }
body.large button { font-size: 19px; padding: 14px 18px; }
body.large .options { gap: 12px; }
body.large .options button { width: 100%; min-height: 56px; padding: 16px 18px; }
body.large .card > button.primary, body.large .card > .flex > button { width: 100%; }
body.large input[type=checkbox] { width: 24px; height: 24px; }

.category { border: 1px solid var(--line); border-left-width: 6px; border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.category.recommended { border-left-color: #31a354; }
.category.conditional { border-left-color: #84cc16; }
.category.review { border-left-color: #f59e0b; }
.category.not_recommended { border-left-color: #e02424; }
.category.undetermined { border-left-color: #9ca3af; }
.category p, .category ul { margin: 6px 0; }
.battery-part { border-top: 2px solid var(--line); margin-top: 20px; padding-top: 12px; }

.qr-wrap { display: flex; gap: 12px; align-items: center; margin: 8px 0 12px; }
.qr { width: 160px; height: 160px; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
@media print { .qr { width: 220px; height: 220px; } }

/* Интервью после опросника */
textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; width: 100%; background: #fff; }
button.mic { width: 100%; min-height: 64px; font-size: 20px; border-radius: 999px; margin: 8px 0; }
button.mic.recording { background: var(--red); border-color: var(--red); }
button.linkish { border: none; background: none; color: var(--muted); text-decoration: underline; padding: 6px 0; }
audio { width: 100%; margin: 8px 0; }
.iv-answer { white-space: pre-wrap; background: var(--bg); border-radius: 8px; padding: 8px 12px; margin: 6px 0; }

/* Категории решения и зоны шкал теста guard */
.zone.cat-recommended { background: var(--green); }
.zone.cat-conditional { background: #4d7c0f; }
.zone.cat-review { background: var(--yellow); }
.zone.cat-not_recommended { background: var(--red); }
.zone.cat-undetermined { background: #6b7280; }
/* Лидерский потенциал: те же цвета, что у зон, подпись — уровень потенциала */
.zone.pot-green { background: var(--green); }
.zone.pot-yellow { background: var(--yellow); }
.zone.pot-red { background: var(--red); }
.zone.pot-unreliable { background: #6b7280; }
.bar.z-green > div { background: #31a354; }
.bar.z-yellow > div { background: #f59e0b; }
.bar.z-red > div { background: #e02424; }
/* Исход после найма и биографические ответы */
input[type=date] { display: block; font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.inc-row { margin: 0 0 6px; }
.inc-row select { width: auto; flex: 1; }
details.bio { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 16px 0; }
details.bio summary { cursor: pointer; font-weight: 600; }
/* Описательные шкалы личностного профиля: без цвета риска */
.level.neutral { background: #eef2f7; color: #334155; }
.interp.neutral { border-color: #94a3b8; }
.bar.neutral > div { background: #94a3b8; }
/* Галочка согласия: длинная подпись переносится рядом с галочкой, а не под ней */
label.agree { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; cursor: pointer; }
label.agree input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; }
