:root {
    --accent: #673ab7;
    --page: #f0ebf8;
    --ink: #202124;
    --muted: #5f6368;
    --line: #dadce0;
    --error: #d93025;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font: 14px/1.5 Roboto, Arial, sans-serif;
}

.page { max-width: 640px; margin: 0 auto; padding: 12px 12px 48px; }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    margin-top: 12px;
}

.head { border-top: 10px solid var(--accent); }
.head h1 { font-size: 32px; font-weight: 400; line-height: 1.25; margin: 0 0 12px; }
.head p { margin: 0; }
.required-note { color: var(--error); padding-top: 12px; }

.question-title { display: block; font-size: 16px; margin-bottom: 16px; }
.star { color: var(--error); }

.option { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; cursor: pointer; }
.option input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }

textarea, input[type="password"], input[type="email"] {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    font: inherit;
    color: inherit;
    background: none;
    outline: none;
    resize: vertical;
}
textarea:focus, input[type="password"]:focus, input[type="email"]:focus { border-bottom: 2px solid var(--accent); padding-bottom: 7px; }
#gate input + label { margin-top: 24px; }

.question-error { display: none; color: var(--error); font-size: 12px; margin-top: 12px; }
.question.invalid { border-color: var(--error); }
.question.invalid .question-error { display: block; }

.notice { color: var(--error); margin-top: 12px; }

.actions { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.btn {
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 10px 24px;
    font: 500 14px/1 Roboto, Arial, sans-serif;
    cursor: pointer;
}
.btn:disabled { opacity: 0.6; cursor: default; }
.link { background: none; border: 0; padding: 8px; color: var(--accent); font: inherit; cursor: pointer; }
a { color: var(--accent); }

/* Страница результатов */
.hint { color: var(--muted); font-size: 12px; margin: -8px 0 16px; }
.bar-row { display: grid; grid-template-columns: 1fr 1fr 72px; gap: 12px; align-items: center; padding: 6px 0; }
.bar-track { height: 12px; }
.bar-fill { height: 100%; min-width: 2px; background: var(--accent); border-radius: 0 4px 4px 0; }
.bar-value { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.texts { margin: 0; padding-left: 20px; }
.texts li { padding: 4px 0; overflow-wrap: anywhere; }

@media (max-width: 480px) {
    .head h1 { font-size: 24px; }
    .bar-row { grid-template-columns: 1fr 72px; }
    .bar-label { grid-column: 1 / -1; }
}
