:root {
    --bg: #f7f7f5;
    --surface: #fff;
    --text: #171717;
    --muted: #747474;
    --line: #deded9;
    --orange: #ef7a2d;
    --blue: #315f9f;
    --green: #7fa34e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

.wrap {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 80px;
}

.hero {
    padding-bottom: 30px;
    border-bottom: 1px solid var(--line);
}

.kicker {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--blue);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1, h2 {
    margin: 0;
    letter-spacing: -.03em;
}

h1 {
    font-size: clamp(2.4rem, 7vw, 4.4rem);
    line-height: 1;
    font-weight: 800;
}

h2 {
    font-size: 1.3rem;
    line-height: 1.2;
    font-weight: 750;
}

.hero p {
    max-width: 600px;
    margin: 14px 0 0;
    color: var(--muted);
}

.card {
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.role-option {
    position: relative;
}

.role-option input,
.rating input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    font-size: .95rem;
    font-weight: 650;
    text-align: center;
    cursor: pointer;
}

.role-option input:checked + label {
    border-color: var(--blue);
    background: #f3f6fa;
}

.question {
    padding: 22px 0;
    border-top: 1px solid var(--line);
}

.question:first-of-type {
    margin-top: 8px;
    border-top: 0;
}

.question-title {
    margin-bottom: 10px;
    font-weight: 700;
}

.help {
    margin: -2px 0 12px;
    color: var(--muted);
    font-size: .88rem;
}

.rating {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.rating > div {
    position: relative;
}

.rating label {
    display: grid;
    place-items: center;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    font-weight: 700;
    cursor: pointer;
}

.rating input:checked + label {
    border-color: var(--orange);
    background: #fff6ef;
}

textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    padding: 12px 13px;
    font: inherit;
    outline: none;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

textarea:focus,
select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(49,95,159,.08);
}

button {
    width: 100%;
    margin-top: 24px;
    border: 0;
    border-radius: 9px;
    padding: 14px 18px;
    background: var(--text);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.notice {
    margin-top: 24px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: 8px;
    background: var(--surface);
}

.notice.success { border-left-color: var(--green); }
.notice.error { border-left-color: #b84c4c; }

.hidden { display: none !important; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.stat {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
}

.stat span {
    color: var(--muted);
    font-size: .85rem;
}

.stat strong {
    display: block;
    margin-top: 3px;
    font-size: 1.6rem;
}

.admin-table {
    width: 100%;
    margin-top: 14px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 11px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--muted);
    font-size: .82rem;
}

@media (max-width: 640px) {
    .wrap {
        width: min(100% - 24px, 760px);
        padding-top: 28px;
    }

    .role-grid {
        grid-template-columns: 1fr;
    }

    .rating {
        gap: 6px;
    }

    .rating label {
        min-height: 44px;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
