/*
 * «9 форм среды» — оформление по брендбуку «Глобальный университет Силы Сообществ» 2026,
 * те же решения, что в каталоге экспертов ГУ (паспорт стиля: ГУ Фирменный стиль/паспорт_стиля_экраны.md).
 * Без внешних шрифтов и CDN: всё своё (нужно для строгой защиты страницы).
 */
@font-face { font-family: "Hero New"; font-weight: 300; font-display: swap; src: url("fonts/hero-new-light.otf") format("opentype"); }
@font-face { font-family: "Hero New"; font-weight: 400; font-display: swap; src: url("fonts/hero-new-regular.otf") format("opentype"); }
@font-face { font-family: "Hero New"; font-weight: 500; font-display: swap; src: url("fonts/hero-new-medium.otf") format("opentype"); }
@font-face { font-family: "Hero New"; font-weight: 600; font-display: swap; src: url("fonts/hero-new-semibold.otf") format("opentype"); }

:root {
  --font: "Hero New", "Segoe UI", -apple-system, Roboto, Arial, sans-serif;
  --brand: #232E85; --brand-2: #3444C5; --accent-1: #4759FE; --accent-2: #40CD72;
  --brand-20: rgba(35, 46, 133, 0.2); --brand2-20: rgba(52, 68, 197, 0.2);
  --accent1-20: rgba(71, 89, 254, 0.2); --accent2-20: rgba(64, 205, 114, 0.2);
  --white-20: rgba(255, 255, 255, 0.2); --white-60: rgba(255, 255, 255, 0.6); --white-80: rgba(255, 255, 255, 0.8);
  --black-20: rgba(0, 0, 0, 0.2);
  --card: #FAFAFA; --soft: #F0F0F0; --line: #EEEEEE; --line-2: #E3E3E3; --muted: #666666; /* чёрный 60% (ББ 3.1: оттенки шагом 20%) — #787878 с сайта не проходит контраст 4,5 */ --faint: #A7A7A7;
  --r-sm: 8px; --r-btn: 16px; --r-card: 23px; --r-lg: 30px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #FFFFFF; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #FFFFFF; color: #000000; font-family: var(--font);
  font-size: 16px; line-height: 1.4; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--brand); }
::selection { background: var(--accent1-20); }
:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }

/* ---------------------------------------------------------- Шапка */
.topbar { position: sticky; top: 0; z-index: 30; background: #FFFFFF; border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: #000000; text-decoration: none; }
.brand img { width: 28px; height: 35px; flex-shrink: 0; }
.brand-title { font-size: 20px; line-height: 23px; font-weight: 500; letter-spacing: -0.03em; white-space: nowrap; }
.brand-sub { font-size: 14px; line-height: 17px; color: var(--muted); white-space: nowrap; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 640px) { .wrap { padding-left: 30px; padding-right: 30px; } }
main.wrap { padding-top: 24px; padding-bottom: 64px; }

/* ---------------------------------------------------------- Текст */
.eyebrow { font-size: 14px; line-height: 18px; font-weight: 500; letter-spacing: -0.02em; color: var(--muted); margin-bottom: 8px; }
.h1 { font-size: 36px; line-height: 40px; font-weight: 500; letter-spacing: -0.04em; margin-bottom: 16px; }
@media (min-width: 640px) { .h1 { font-size: 48px; line-height: 50px; } }  /* САЙТ 1: главный заголовок 48/50 */
.h2 { font-size: 28px; line-height: 32px; font-weight: 500; letter-spacing: -0.04em; margin-bottom: 8px; }
@media (min-width: 640px) { .h2 { font-size: 32px; line-height: 36px; } }
.h3 { font-size: 20px; line-height: 23px; font-weight: 500; letter-spacing: -0.03em; margin-bottom: 12px; }
.lead { font-size: 18px; line-height: 26px; color: #000000; margin-bottom: 24px; max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 20px; }
.tiny { font-size: 12px; line-height: 16px; }
.pre { white-space: pre-line; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.center { text-align: center; }
.list { padding-left: 20px; display: grid; gap: 8px; }
.list li::marker { color: var(--brand); }

/* ---------------------------------------------------------- Карточки */
.card { background: var(--card); border-radius: var(--r-card); padding: 20px; margin-bottom: 12px; overflow-wrap: anywhere; }
@media (min-width: 640px) { .card { padding: 24px; } }
.notice { background: var(--brand2-20); border-radius: var(--r-card); padding: 20px; margin-bottom: 24px; }
@media (min-width: 640px) { .notice { padding: 24px; } }
.notice .h3 { color: var(--brand); }
.note { background: var(--soft); border-radius: var(--r-btn); padding: 14px 16px; font-size: 14px; line-height: 20px; }

.choices { display: grid; gap: 12px; }
@media (min-width: 640px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between;
  gap: 24px; min-height: 180px; padding: 24px; border-radius: var(--r-lg); text-align: left; background: var(--card); color: #000000;
  transition: background-color 0.15s;
}
.choice:hover { background: var(--soft); }
.choice-title { font-size: 24px; line-height: 28px; font-weight: 500; letter-spacing: -0.04em; margin-bottom: 6px; }
.choice-text { font-size: 16px; line-height: 22px; color: var(--muted); }
.choice-foot { display: flex; justify-content: flex-end; }
.arrow-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #FFFFFF; }
.choice-primary {
  color: #FFFFFF;
  background: radial-gradient(120% 70% at 50% 115%, var(--white-20) 0%, rgba(255, 255, 255, 0) 60%), linear-gradient(160deg, var(--brand-2) 0%, var(--brand) 100%);
}
.choice-primary:hover { background: radial-gradient(120% 70% at 50% 115%, var(--white-20) 0%, rgba(255, 255, 255, 0) 60%), linear-gradient(160deg, var(--accent-1) 0%, var(--brand) 100%); }
.choice-primary .choice-text { color: var(--white-80); }
.choice-primary .arrow-btn { background: #FFFFFF; color: var(--brand); }
/* приём брендбука 9.1: крупный фрагмент знака с пониженной непрозрачностью, срезан краем */
.choice-primary::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; width: 220px; height: 274px; right: -70px; bottom: -110px;
  background: url("img/gu-mark-white.svg") no-repeat center / contain; opacity: 0.2; transform: rotate(-20deg);
}

/* ---------------------------------------------------------- Кнопки (42px, радиус 16, 16/500) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px;
  border-radius: var(--r-btn); border: 1px solid transparent; font-size: 16px; line-height: 1.1; font-weight: 500; letter-spacing: -0.04em;
  cursor: pointer; text-decoration: none; text-align: center; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #FFFFFF; }
.btn-primary:not(:disabled):hover { background: var(--brand-2); }
.btn-ghost { background: #FFFFFF; color: var(--brand); border-color: var(--brand); }
.btn-ghost:not(:disabled):hover { background: var(--brand); color: #FFFFFF; }
.btn-soft { background: var(--soft); color: #000000; }
.btn-soft:hover { background: var(--line-2); }
.btn-quiet { background: transparent; color: var(--brand); padding: 0 12px; }
.btn-quiet:hover { background: var(--soft); }
.btn-lg { min-height: 52px; padding: 0 24px; }
.btn-sm { min-height: 34px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row > .btn { flex: 1 1 200px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 20px -8px; padding: 6px 8px; border-radius: 10px; color: var(--brand); font-size: 14px; font-weight: 500; }
.back:hover { background: var(--soft); }
.link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--brand); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }

/* ---------------------------------------------------------- Поля */
.field { display: block; margin-bottom: 14px; }
.label { display: block; margin-bottom: 6px; font-size: 14px; line-height: 18px; font-weight: 500; }
.label small { font-weight: 400; color: var(--muted); }
.input {
  display: block; width: 100%; min-height: 42px; padding: 10px 14px; border-radius: var(--r-btn);
  background: var(--soft); border: 1px solid transparent; font-size: 16px; line-height: 1.3; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.input::placeholder { color: var(--faint); opacity: 1; }
.input:focus { background: #FFFFFF; border-color: var(--accent-1); box-shadow: 0 0 0 3px var(--accent1-20); }
.card .input { background: #FFFFFF; border-color: var(--line-2); }
textarea.input { min-height: 96px; resize: vertical; }
.input-code { text-align: center; font-size: 28px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; min-height: 60px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; line-height: 22px; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.error { margin-top: 12px; padding: 12px 16px; border-radius: var(--r-btn); background: var(--soft); font-size: 14px; line-height: 20px; font-weight: 500; }
.error:empty { display: none; }

/* ---------------------------------------------------------- Код команды, прогресс */
.code-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.code-row .btn { white-space: nowrap; }
.code-big { white-space: nowrap; font-size: 40px; line-height: 44px; font-weight: 500; letter-spacing: 0.18em; color: var(--brand); }
.track { height: 10px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.card .track { background: #FFFFFF; border: 1px solid var(--line); }
.fill { height: 100%; border-radius: 5px; background: var(--brand); transition: width 0.4s ease; }
.fill-ok { background: var(--accent-2); }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge-done { background: var(--accent2-20); }
.badge-live { background: var(--accent1-20); color: var(--brand); }
.ok-text { color: #000000; font-weight: 500; }
.ok-text::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 4px; background: var(--accent-2); vertical-align: 1px; }

/* ---------------------------------------------------------- Мои диагностики */
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; margin-bottom: 8px; border-radius: var(--r-card); background: var(--card); color: #000000; text-decoration: none; }
.team-row:hover { background: var(--soft); }
.team-name { font-size: 18px; line-height: 22px; font-weight: 500; letter-spacing: -0.03em; overflow-wrap: anywhere; }

/* ---------------------------------------------------------- Опрос */
.steps { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; margin-bottom: 16px; }
.step { height: 6px; border-radius: 3px; background: var(--soft); }
.step-done { background: var(--brand); }
.step-now { background: var(--accent-1); }
.q { padding: 18px 0; border-bottom: 1px solid var(--line); }
.q:last-child { border-bottom: 0; }
.q-text { font-size: 17px; line-height: 24px; margin-bottom: 12px; }
.q-miss .q-text { color: var(--brand); font-weight: 500; }
.likert { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 2.2fr); gap: 6px; }
@media (max-width: 479px) { .likert { grid-template-columns: repeat(5, minmax(0, 1fr)); } .likert .lk-na { grid-column: 1 / -1; } }
.lk {
  min-height: 44px; border-radius: 12px; background: #FFFFFF; border: 1px solid var(--line-2);
  font-size: 16px; font-weight: 500; transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.lk:hover { border-color: var(--brand); }
.lk-na { font-size: 14px; color: var(--muted); }
.lk.on { background: var(--brand); border-color: var(--brand); color: #FFFFFF; }
.scale-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; line-height: 18px; color: var(--muted); }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 8px; margin: 16px -16px 0; padding: 12px 16px; background: #FFFFFF; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .sticky-actions { margin: 16px -30px 0; padding: 12px 30px; } }
.sticky-actions .btn { flex: 1; }

/* ---------------------------------------------------------- Профили */
.bar-row { margin-bottom: 16px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 16px; line-height: 20px; }
.bar-name::first-letter { text-transform: uppercase; }
.bar-value { font-weight: 500; white-space: nowrap; }
.bar-meta { margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--muted); }
.bar-top .bar-name { color: var(--brand); font-weight: 500; }
.bar-top .fill { background: var(--accent-1); }
.flag { display: inline-flex; align-items: center; margin-left: 6px; height: 20px; padding: 0 8px; border-radius: 10px; background: var(--accent1-20); color: var(--brand); font-size: 12px; font-weight: 500; vertical-align: 2px; }

/* ---------------------------------------------------------- Теория */
.theory { margin-bottom: 12px; }
.theory-name { font-size: 22px; line-height: 26px; font-weight: 500; letter-spacing: -0.03em; margin-bottom: 4px; }
.theory-name::first-letter { text-transform: uppercase; }
.theory-tag { font-size: 14px; line-height: 18px; color: var(--muted); margin-bottom: 12px; }
.theory-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 21px; }
.theory-table td { padding: 10px 0; border-top: 1px solid var(--line); vertical-align: top; white-space: pre-line; }
.theory-table td:first-child { width: 34%; padding-right: 16px; font-weight: 500; color: var(--brand); }
@media (max-width: 479px) { .theory-table td { display: block; width: 100% !important; } .theory-table td:first-child { padding-bottom: 0; border-top: 1px solid var(--line); } .theory-table td:last-child { border-top: 0; padding-top: 4px; } }

.stat-item { font-size: 13px; line-height: 18px; color: var(--muted); padding: 6px 0; border-top: 1px solid var(--line); }
.foot { margin-top: 40px; text-align: center; }
.foot a { font-size: 12px; color: var(--muted); }
.loading { padding: 64px 0; text-align: center; color: var(--muted); }

.scale-legend span { white-space: nowrap; }
