/* Деловые Линии — фирменный стиль админки.
   Та же система, что в опросном листе и PDF-отчёте: чёрный/белый,
   жёлтый только акцентом, прямые углы, uppercase-заголовки секций. */

:root {
    color-scheme: light;
    --ink: #000;
    --paper: #fff;
    --bg: #e9e9e9;
    --yellow: #f2a900;
    --grey-1: #cfcfcf;
    --grey-3: #4a4a4a;
    --line: #d8d8d8;
    --muted: #666;
    --red: #a02e2e;
    --amber: #8a6100;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font: 14px/1.55 "Директ", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

b,
strong {
    font-weight: 700;
}

/* Навигация */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 236px;
    padding: 26px 0;
    background: var(--ink);
    color: #fff;
}

.brand {
    display: grid;
    gap: 3px;
    margin: 0 22px 38px;
}

.brand img {
    display: block;
    height: 22px;
    margin-bottom: 12px;
}

.brand strong {
    font-size: 14px;
    line-height: 1.2;
}

.brand small {
    color: #a8a8a8;
    font-size: 10px;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.logout-form {
    margin: 0 22px 22px;
}

.logout-button {
    width: 100%;
    border: 1px solid #4a4a4a;
    border-radius: 0;
    padding: 8px 12px;
    background: transparent;
    color: #b8b8b8;
    font-family: inherit;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .07em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}

.logout-button:hover {
    border-color: var(--yellow);
    color: #fff;
}

nav {
    display: grid;
}

/* Вход в админку */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--ink);
}

.login-card {
    width: 100%;
    max-width: 280px;
    margin: 0;
    padding: 0;
    display: grid;
    justify-items: center;
    color: #fff;
    text-align: center;
}

.login-logo {
    height: 20px;
    margin-bottom: 22px;
    opacity: .9;
}

.login-title {
    margin: 0 0 40px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #8a8a8a;
}

.login-form {
    width: 100%;
    display: grid;
    gap: 22px;
}

.login-form input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #3a3a3a;
    border-radius: 0;
    padding: 0 0 10px;
    background: transparent;
    color: #fff;
    font: 15px/1.4 inherit;
    text-align: center;
    transition: border-color .15s;
}

.login-form input::placeholder {
    color: #6a6a6a;
}

.login-form input:focus {
    outline: none;
    border-bottom-color: var(--yellow);
}

.login-form button {
    border: 0;
    border-radius: 0;
    padding: 12px;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity .15s;
}

.login-form button:hover {
    opacity: .85;
}

.login-error {
    margin: -8px 0 0;
    color: #ff8a8a;
    font-size: 12px;
}

.nav-button {
    display: flex;
    gap: 11px;
    align-items: center;
    width: 100%;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 0;
    padding: 12px 19px;
    background: transparent;
    color: #b8b8b8;
    font-weight: 700;
    font-size: 11px;
    font-family: inherit;
    letter-spacing: .07em;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
    transition: background .12s, color .12s;
}

.nav-button span {
    width: 18px;
    text-align: center;
    font-size: 15px;
    letter-spacing: normal;
}

.nav-button:hover {
    background: #1c1c1c;
    color: #fff;
}

.nav-button.active {
    background: #1c1c1c;
    border-left-color: var(--yellow);
    color: #fff;
}

main {
    margin-left: 236px;
    padding: 44px clamp(24px, 4vw, 60px) 80px;
}

/* Заголовок страницы */
.page-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--ink);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-weight: 700;
    font-size: 27px;
    line-height: 1.2;
    font-family: inherit;
    letter-spacing: -.01em;
}

.search {
    display: flex;
    align-items: center;
    gap: 9px;
    width: min(320px, 40vw);
    padding: 0 13px;
    border: 1px solid var(--grey-1);
    background: var(--paper);
    color: var(--muted);
}

.search span {
    font-size: 18px;
}

.search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 11px 0;
    background: transparent;
    font: inherit;
}

.search:focus-within {
    border-color: var(--ink);
    outline: 2px solid var(--yellow);
    outline-offset: -1px;
}

/* Список ответов */
.column-head,
.response summary {
    display: grid;
    grid-template-columns: 1fr .85fr 2.1fr;
    gap: 18px;
    align-items: center;
}

.column-head {
    padding: 0 22px 9px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.responses {
    display: grid;
    gap: 8px;
}

.response {
    border: 1px solid var(--line);
    background: var(--paper);
}

.response summary {
    min-height: 82px;
    padding: 16px 22px;
    list-style: none;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.response summary::-webkit-details-marker {
    display: none;
}

.response summary:hover {
    border-left-color: var(--grey-1);
}

.response[open] summary {
    border-bottom: 1px solid var(--line);
    border-left-color: var(--yellow);
    background: #f7f7f7;
}

.person {
    display: grid;
    gap: 3px;
}

.person strong {
    font-size: 15px;
}

.person time,
.answer-summary {
    color: var(--muted);
    font-size: 12px;
}

.answer-summary {
    display: grid;
    gap: 3px;
}

.answer-summary span {
    color: var(--grey-3);
    font-size: 11.5px;
}

.processing-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.processing-summary .status {
    margin-right: auto;
}

/* Кнопки в строке ответа узкие — держим подписи в одну строку */
.processing-summary button,
.processing-summary .btn-pdf {
    padding: 10px 13px;
    letter-spacing: .04em;
    white-space: nowrap;
}

/* Индикаторы статуса — квадратные метки вместо точек */
.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status i,
.key-indicator i {
    width: 9px;
    height: 9px;
    flex: none;
    background: var(--grey-1);
}

.status-sending i,
.status-processing i {
    background: var(--yellow);
    animation: pulse 1.2s infinite;
}

.status-done i,
.key-indicator.configured i {
    background: var(--ink);
}

.status-error i {
    background: var(--red);
}

@keyframes pulse {
    50% {
        opacity: .3;
    }
}

/* Кнопки. Общая база: одинаковые padding, рамка и line-height, иначе
   <a class="btn-pdf"> и <button> дают разную высоту в одном ряду. */
button,
.btn-pdf,
.btn-delete,
.btn-add-model,
.btn-remove-model {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 0;
    padding: 11px 18px;
    font-weight: 700;
    font-size: 11px;
    line-height: 1.2;
    font-family: inherit;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}

button {
    background: var(--ink);
    color: #fff;
}

button:hover {
    background: var(--yellow);
    color: var(--ink);
}

button:disabled {
    opacity: .4;
    cursor: wait;
}

button:disabled:hover {
    background: var(--ink);
    color: #fff;
}

.btn-pdf {
    background: var(--paper);
    border-color: var(--ink);
    color: var(--ink);
}

.btn-pdf:hover {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--ink);
}

.btn-delete {
    background: var(--paper);
    border-color: var(--grey-1);
    color: var(--red);
}

.btn-delete:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

/* Аналитика по ответу */
.report-verdict {
    margin: 0 0 6px;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
    font-family: inherit;
    padding: 9px 12px;
    background: var(--yellow);
}

.report-confidence {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 11.5px;
}

.report-summary {
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.6;
}

.score-bars {
    display: grid;
    gap: 8px;
    margin: 0 0 16px;
}

.score-bar {
    display: grid;
    grid-template-columns: 190px 1fr 90px;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.score-track {
    background: var(--grey-1);
    height: 16px;
    position: relative;
}

.score-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: var(--grey-3);
}

.score-bar.dominant .score-fill {
    background: var(--ink);
}

.score-value {
    text-align: right;
}

.divergence,
.divergence-none {
    margin: 0 0 14px;
    font-size: 12.5px;
}

.divergence-none {
    color: var(--muted);
}

/* Доказательная база — маркером служит квадратный тег типа, буллеты не нужны */
.evidence-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    font-size: 12.5px;
    display: grid;
    gap: 8px;
}

.interview-questions {
    margin: 0 0 14px;
    padding-left: 18px;
    font-size: 12.5px;
    display: grid;
    gap: 8px;
}

.interview-questions li::marker {
    font-weight: 700;
}

.type-tag {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: var(--ink);
    color: #fff;
    text-align: center;
    line-height: 18px;
    font-size: 9.5px;
    font-weight: 700;
    margin-right: 6px;
}

.source-questions,
.hypothesis {
    color: var(--muted);
}

.response-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.response-body>section {
    min-width: 0;
    padding: 26px;
}

.analysis-column {
    border-left: 1px solid var(--line);
    background: #f7f7f7;
}

.response-body h2 {
    margin: 0 0 18px;
    padding-bottom: 7px;
    border-bottom: 1.5px solid var(--ink);
    font-weight: 700;
    font-size: 11.5px;
    font-family: inherit;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.answer {
    margin: 0 0 18px;
}

.answer h3 {
    display: grid;
    gap: 4px;
    margin: 0 0 6px;
    font-size: 12.5px;
    line-height: 1.45;
}

.answer h3 span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.answer p {
    margin: 4px 0;
    padding-left: 11px;
    border-left: 2px solid var(--grey-1);
    color: var(--grey-3);
    font-size: 12.5px;
}

.placeholder,
.muted {
    color: var(--muted);
}

.processing-error {
    padding: 12px;
    border-left: 3px solid var(--red);
    background: #f6ecec;
    color: var(--red);
    font-size: 12.5px;
}

.markdown {
    font-size: 13.5px;
    line-height: 1.65;
}

.markdown p {
    margin: 0 0 12px;
}

.markdown ul {
    padding-left: 20px;
}

.markdown h3,
.markdown h4,
.markdown h5 {
    margin: 20px 0 8px;
}

.markdown code {
    padding: 2px 5px;
    background: #ececec;
}

.model-used {
    display: block;
    margin-top: 22px;
    color: var(--muted);
    font-size: 11.5px;
}

.empty {
    padding: 66px;
    border: 1px dashed var(--grey-1);
    color: var(--muted);
    text-align: center;
}

.settings-view {
    max-width: 980px;
}

.test-intro {
    margin: -14px 0 24px;
    max-width: 640px;
    font-size: 13px;
}

.test-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}

.test-form {
    display: grid;
    gap: 12px;
}

.test-form fieldset {
    margin: 0;
    padding: 18px 20px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.test-form .question-title {
    padding: 0 0 7px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--ink);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.4;
    font-family: inherit;
}

/* Сюжет и все вопросы по нему (анкета 3) обведены одной рамкой — как в форме */
.test-form .scenario-group {
    margin: 0 0 16px;
    padding: 0 0 12px;
    border: 1.5px solid var(--ink);
}

.test-form .scenario {
    margin: 0 0 12px;
    padding: 11px 13px 12px;
    background: var(--ink);
    color: #fff;
}

.test-form .scenario span {
    display: block;
    margin-bottom: 6px;
    color: var(--yellow);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.test-form .scenario p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
}

.test-form .scenario-group fieldset {
    padding: 0 13px;
}

.test-form .hint {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 11.5px;
}

.test-form fieldset>label:not(.text-field) {
    display: flex;
    gap: 9px;
    margin: 2px 0;
    padding: 7px 9px;
    border-left: 3px solid transparent;
    font-size: 12.5px;
    cursor: pointer;
}

.test-form fieldset>label:not(.text-field):hover {
    background: #f4f4f4;
}

.test-form fieldset>label:not(.text-field):has(:checked) {
    background: #f4f4f4;
    border-left-color: var(--yellow);
}

.test-form input[type="checkbox"],
.test-form input[type="radio"] {
    width: 15px;
    height: 15px;
    margin: 2px 0 0;
    flex: none;
    accent-color: var(--ink);
}

.test-form .text-field {
    display: grid;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}

.test-form .text-field.other {
    margin-top: 4px;
}

.test-form .text-field textarea,
.test-form .text-field input,
.test-form>.text-field textarea {
    width: 100%;
    border: 1px solid var(--grey-1);
    border-radius: 0;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.5;
    font-family: inherit;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ink);
}

.test-form textarea:focus,
.test-form input:focus {
    outline: 2px solid var(--yellow);
    outline-offset: -1px;
    border-color: var(--ink);
}

.model-fields {
    display: grid;
    gap: 10px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.model-fields label {
    display: grid;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}

.model-fields input,
.model-fields select {
    border: 1px solid var(--grey-1);
    border-radius: 0;
    padding: 10px 12px;
    font: 12.5px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ink);
    background: var(--paper);
}

.model-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.model-row label {
    flex: 1;
}

.btn-remove-model {
    flex: none;
    padding: 11px 13px;
    border-color: var(--grey-1);
    background: var(--paper);
    color: var(--muted);
}

.btn-remove-model:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.btn-add-model {
    justify-self: start;
    border: 1px dashed var(--ink);
    background: transparent;
    color: var(--ink);
}

.btn-add-model:hover {
    background: var(--yellow);
    border-style: solid;
}

.test-results {
    display: grid;
    gap: 14px;
    align-content: start;
    position: sticky;
    top: 24px;
}

.answers-summary {
    border: 1px solid var(--line);
    background: var(--paper);
}

.answers-summary summary {
    padding: 12px 18px;
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 11px;
    font-family: inherit;
    letter-spacing: .07em;
    text-transform: uppercase;
    background: #f7f7f7;
}

.answers-summary summary::-webkit-details-marker {
    display: none;
}

.answers-summary summary::before {
    content: '▸ ';
    color: var(--muted);
}

.answers-summary[open] summary::before {
    content: '▾ ';
}

.answers-summary[open] summary {
    border-bottom: 1px solid var(--line);
}

.answers-summary-body {
    display: grid;
    gap: 14px;
    padding: 16px 18px;
}

.answers-summary-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12.5px;
}

.answers-summary-item p {
    margin: 3px 0;
    padding-left: 11px;
    border-left: 2px solid var(--grey-1);
    color: var(--grey-3);
    font-size: 12.5px;
}

.model-result {
    border: 1px solid var(--line);
    background: var(--paper);
}

.model-result header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--ink);
    color: #fff;
}

.model-result header strong {
    font-size: 11.5px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.model-result header time {
    color: #b8b8b8;
    font-size: 11.5px;
    white-space: nowrap;
}

.result-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    color: var(--muted);
    font-size: 11.5px;
}

.model-result .body {
    padding: 18px;
}

.truncated-notice {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-left: 3px solid var(--yellow);
    background: #fdf4e0;
    color: var(--amber);
    font-size: 12.5px;
}

.model-result.pending .body {
    color: var(--muted);
}

.model-result.failed header {
    background: var(--red);
}

@media(max-width:1100px) {
    .test-layout {
        grid-template-columns: 1fr;
    }

    .test-results {
        position: static;
    }
}

/* Настройки */
.settings-card {
    display: grid;
    gap: 22px;
    padding: 28px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.settings-card label {
    display: grid;
    gap: 8px;
}

.settings-card label>span {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}

.settings-card small {
    color: var(--muted);
    font-size: 12px;
}

.settings-card input,
.settings-card textarea {
    width: 100%;
    border: 1px solid var(--grey-1);
    border-radius: 0;
    padding: 12px 14px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}

.settings-card textarea {
    resize: vertical;
    font: 12.5px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.settings-card input:focus,
.settings-card textarea:focus {
    outline: 2px solid var(--yellow);
    outline-offset: -1px;
    border-color: var(--ink);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}

.form-actions p {
    margin: 0;
    font-size: 12.5px;
    color: var(--muted);
}

.form-actions p.error {
    color: var(--red);
    font-weight: 700;
}

.key-card p {
    margin: 0;
    font-size: 13px;
}

.key-card pre {
    overflow: auto;
    margin: 0;
    padding: 15px;
    background: var(--ink);
    color: #fff;
    font-size: 12.5px;
}

.key-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    max-width: 420px;
    padding: 13px 18px;
    border-left: 3px solid var(--yellow);
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    box-shadow: 0 8px 30px #00000026;
}

.toast.error {
    border-left-color: var(--red);
}

@media(max-width:950px) {
    .sidebar {
        position: static;
        width: 100%;
        padding: 14px 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .brand {
        margin: 0;
    }

    .brand img {
        margin-bottom: 0;
    }

    .brand small,
    .brand strong {
        display: none;
    }

    nav {
        display: flex;
    }

    .nav-button {
        width: auto;
        border-left: 0;
        border-bottom: 3px solid transparent;
    }

    .nav-button.active {
        border-left: 0;
        border-bottom-color: var(--yellow);
    }

    .nav-button span {
        display: none;
    }

    main {
        margin: 0;
        padding: 30px 20px;
    }

    .column-head {
        display: none;
    }

    .response summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .processing-summary {
        justify-content: flex-start;
    }

    .response-body {
        grid-template-columns: 1fr;
    }

    .analysis-column {
        border-left: 0;
        border-top: 1px solid var(--line);
    }
}

@media(max-width:620px) {
    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .search {
        width: 100%;
    }

    h1 {
        font-size: 23px;
    }

    .response-body>section {
        padding: 22px 18px;
    }
}

/* Метка версии анкеты в строке ответа */
.version-badge {
    justify-self: start;
    padding: 2px 6px;
    background: #ececec;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* Вкладки промптов по версиям анкеты */
.prompt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1.5px solid var(--ink);
}

.prompt-tab {
    border: 1px solid var(--line);
    border-bottom: 0;
    padding: 10px 16px;
    background: var(--paper);
    color: var(--muted);
}

.prompt-tab:hover {
    background: #f4f4f4;
    color: var(--ink);
}

.prompt-tab.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.prompt-tab.active:hover {
    background: var(--ink);
    color: #fff;
}

/* Выбор версии анкеты в песочнице */
.version-picker {
    display: grid;
    gap: 6px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--yellow);
    background: var(--paper);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}

.version-picker select {
    border: 1px solid var(--grey-1);
    border-radius: 0;
    padding: 10px 12px;
    background: var(--paper);
    color: var(--ink);
    font: 13px inherit;
    letter-spacing: normal;
    text-transform: none;
}

/* Ранжирование в песочнице */
.test-form .ranking-head,
.test-form .ranking-row {
    display: grid;
    grid-template-columns: 1fr repeat(3, 40px);
    align-items: center;
    gap: 6px;
}

.test-form .ranking-head {
    padding: 0 9px 5px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.test-form .ranking-head span+span {
    text-align: center;
}

.test-form .ranking-row {
    padding: 9px;
    border-bottom: 1px solid var(--line);
    border-left: 3px solid transparent;
    font-size: 12.5px;
}

.test-form .ranking-row:last-child {
    border-bottom: 0;
}

.test-form .ranking-row:has(input:checked) {
    background: #f4f4f4;
}

.test-form .ranking-row:has(input[name$="__1"]:checked) {
    border-left-color: var(--yellow);
}

.test-form .ranking-row:has(input[name$="__3"]:checked) {
    border-left-color: var(--grey-1);
}

.test-form .ranking-cell {
    display: grid;
    place-items: center;
    padding: 4px 0;
    cursor: pointer;
}
