:root {
    --bg: #f4efe4;
    --bg-accent: #d7e7da;
    --surface: rgba(255, 252, 246, 0.9);
    --surface-strong: #fffdfa;
    --text: #193229;
    --muted: #5b7066;
    --primary: #1f6b52;
    --primary-strong: #124633;
    --primary-soft: rgba(31, 107, 82, 0.14);
    --border: rgba(25, 50, 41, 0.12);
    --shadow: 0 24px 80px rgba(28, 52, 43, 0.14);
    --radius-xl: 32px;
    --radius-lg: 22px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 30%),
        radial-gradient(circle at bottom right, rgba(31, 107, 82, 0.12), transparent 26%),
        linear-gradient(145deg, var(--bg) 0%, #eef5ef 50%, var(--bg-accent) 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    z-index: -1;
    border-radius: 50%;
    filter: blur(10px);
}

body::before {
    width: 18rem;
    height: 18rem;
    top: 6%;
    right: 4%;
    background: rgba(255, 215, 130, 0.22);
}

body::after {
    width: 16rem;
    height: 16rem;
    left: -4rem;
    bottom: 8%;
    background: rgba(71, 148, 120, 0.18);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 0.85rem 0;
    background: rgba(244, 239, 228, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(25, 50, 41, 0.08);
}

.site-header__inner {
    width: min(1880px, calc(100% - 2rem));
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
}

.site-brand {
    color: var(--primary-strong);
    text-decoration: none;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.site-auth {
    min-width: 320px;
}

.site-auth__form,
.site-auth__status {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    justify-content: flex-end;
}

.site-auth__form input {
    min-height: 44px;
    padding: 0.75rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.88);
    font: inherit;
    color: var(--text);
}

.site-auth__status span {
    font-size: 0.92rem;
    color: var(--muted);
}

.flash-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    display: grid;
    gap: 0.75rem;
    width: min(360px, calc(100% - 2rem));
}

.flash-message {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    font-weight: 700;
}

.flash-message--success {
    border-color: rgba(31, 107, 82, 0.24);
    color: var(--primary-strong);
}

.flash-message--error {
    border-color: rgba(170, 63, 49, 0.24);
    color: #8f2f23;
}

.page-shell {
    width: min(1160px, calc(100% - 2rem));
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 0;
}

.page-shell--survey {
    width: min(1280px, calc(100% - 2rem));
}

.page-shell--compact {
    width: min(1880px, calc(100% - 2rem));
    min-height: 100vh;
    padding: 1rem 0;
}

.hero-panel {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 1.5rem;
    align-items: stretch;
}

.hero-panel--single {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
}

.hero-copy,
.form-panel,
.survey-sidebar,
.survey-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-copy {
    padding: clamp(2rem, 4vw, 4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 800;
}

h1 {
    margin: 0;
    font-family: Georgia, "Palatino Linotype", serif;
    font-size: clamp(2.2rem, 4vw, 4.6rem);
    line-height: 1;
}

.lead {
    margin: 1.5rem 0 0;
    max-width: 36rem;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.partner-showcase {
    margin-top: 1.7rem;
    display: grid;
    gap: 0.8rem;
}

.partner-showcase__header {
    display: grid;
    gap: 0.2rem;
}

.partner-showcase__eyebrow {
    margin: 0;
    color: var(--primary-strong);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.partner-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.partner-card {
    min-height: 132px;
    padding: 0.7rem;
    border-radius: 18px;
    border: 1px solid rgba(25, 50, 41, 0.1);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 24px rgba(25, 50, 41, 0.06);
    display: grid;
    place-items: center;
}

.partner-card img {
    max-width: 100%;
    max-height: 102px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    filter: none;
}

.form-panel {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.role-form,
.questionnaire-form {
    display: grid;
    gap: 1.25rem;
}

.role-grid {
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 0.9rem;
}

.role-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.role-card input {
    position: absolute;
    opacity: 0;
    inset: 0;
}

.role-card__content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface-strong);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.role-card:hover .role-card__content,
.role-card:focus-within .role-card__content {
    transform: translateY(-2px);
    border-color: rgba(31, 107, 82, 0.28);
    box-shadow: 0 16px 36px rgba(25, 50, 41, 0.1);
}

.role-card input:checked + .role-card__content {
    border-color: rgba(31, 107, 82, 0.48);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), var(--primary-soft));
    box-shadow: 0 16px 40px rgba(31, 107, 82, 0.16);
}

.role-card__title {
    font-size: 1.02rem;
    font-weight: 800;
}

.role-card__meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.survey-layout {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.admin-layout {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.compact-board {
    width: 100%;
    display: grid;
    gap: 1rem;
}

.compact-board__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.compact-board__header .lead {
    max-width: 62rem;
    margin-top: 0.9rem;
}

.compact-board__actions {
    min-width: 240px;
    display: grid;
    gap: 0.75rem;
}

.compact-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.compact-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(31, 107, 82, 0.16);
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-strong);
    text-decoration: none;
    font-weight: 800;
}

.compact-tab--active {
    background: linear-gradient(135deg, rgba(31, 107, 82, 0.14), rgba(255, 255, 255, 0.92));
    border-color: rgba(31, 107, 82, 0.32);
}

.compact-section-card {
    padding: 1rem;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.micro-card {
    padding: 1rem;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.micro-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.micro-card__header h2 {
    margin: 0.5rem 0 0;
    font-size: 1.35rem;
    line-height: 1.3;
}

.micro-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.micro-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--muted);
}

.micro-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.micro-dot--match {
    background: #2d8768;
}

.micro-dot--mismatch {
    background: #c55443;
}

.micro-dot--neutral {
    background: #a4b3ad;
}

.micro-grid {
    display: grid;
    grid-template-columns: 56px repeat(var(--role-count), minmax(90px, 1fr));
    gap: 0.45rem;
    align-items: stretch;
}

.micro-grid__head,
.micro-grid__question {
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    text-align: center;
}

.micro-grid__head {
    font-size: 0.82rem;
    font-weight: 800;
}

.micro-grid__head--question,
.micro-grid__question {
    font-weight: 900;
}

.micro-cell {
    min-height: 52px;
    padding: 0.35rem 0.45rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.88);
    display: grid;
    gap: 0.25rem;
    justify-items: center;
    align-content: center;
}

.micro-bar-wrap {
    width: 100%;
    height: 28px;
    display: flex;
    align-items: end;
    justify-content: center;
    border-radius: 10px;
    background: rgba(245, 247, 244, 0.95);
}

.micro-bar-wrap--match {
    background: rgba(32, 144, 102, 0.12);
}

.micro-bar-wrap--mismatch {
    background: rgba(185, 79, 63, 0.12);
}

.micro-bar-wrap--neutral {
    background: rgba(164, 179, 173, 0.18);
}

.micro-bar {
    width: 24px;
    border-radius: 10px 10px 6px 6px;
    background: linear-gradient(180deg, #c9d5cf 0%, #95a69d 100%);
}

.micro-bar.bar-empty {
    background: linear-gradient(180deg, #d7dfdb 0%, #a4b3ad 100%);
}

.micro-bar-wrap--match .micro-bar:not(.bar-empty) {
    background: linear-gradient(180deg, #7fb89c 0%, #2d8768 100%);
}

.micro-bar-wrap--mismatch .micro-bar:not(.bar-empty) {
    background: linear-gradient(180deg, #f1a294 0%, #c55443 100%);
}

.micro-cell__label {
    font-size: 0.72rem;
    font-weight: 900;
    color: var(--muted);
}

.compact-section-card__title {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.compact-section-card__title h2 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.3;
}

.compact-matrix {
    display: grid;
    grid-template-columns: minmax(480px, 2.4fr) repeat(var(--role-count), minmax(100px, 0.8fr));
    gap: 0.5rem;
    align-items: stretch;
}

.compact-matrix__header,
.compact-matrix__question,
.compact-cell {
    min-height: 60px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
}

.compact-matrix__header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem;
    font-weight: 800;
    text-align: center;
}

.compact-matrix__header--question {
    justify-content: flex-start;
}

.compact-matrix__question {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.75rem 0.9rem;
}

.compact-matrix__question-number {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(31, 107, 82, 0.12);
    color: var(--primary-strong);
    font-weight: 800;
}

.compact-matrix__question-text {
    font-size: 0.92rem;
    line-height: 1.45;
}

.compact-cell {
    display: grid;
    gap: 0.2rem;
    align-content: center;
    justify-items: center;
    padding: 0.6rem;
    text-align: center;
}

.compact-cell--match {
    background: linear-gradient(180deg, rgba(32, 144, 102, 0.16), rgba(255, 255, 255, 0.92));
    border-color: rgba(32, 144, 102, 0.24);
}

.compact-cell--mismatch {
    background: linear-gradient(180deg, rgba(185, 79, 63, 0.15), rgba(255, 255, 255, 0.92));
    border-color: rgba(185, 79, 63, 0.24);
}

.compact-cell--neutral {
    background: linear-gradient(180deg, rgba(89, 111, 102, 0.1), rgba(255, 255, 255, 0.92));
}

.compact-cell__badge {
    min-width: 30px;
    min-height: 30px;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    font-weight: 900;
}

.compact-cell__text {
    font-size: 0.82rem;
    line-height: 1.2;
}

.survey-sidebar {
    padding: clamp(1.5rem, 3vw, 2.25rem);
    position: sticky;
    top: 1rem;
}

.survey-sidebar h1 {
    font-size: clamp(1.9rem, 2.3vw, 3.1rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.survey-sidebar .lead {
    max-width: 28rem;
}

.survey-panel {
    padding: clamp(1rem, 2vw, 1.5rem);
}

.admin-panel {
    display: grid;
    gap: 1.5rem;
}

.sidebar-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.sidebar-actions form {
    margin: 0;
}

.sidebar-actions form .secondary-link,
.sidebar-actions form .danger-button {
    width: 100%;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.admin-grid--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card {
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.admin-card--full {
    padding: 1.5rem;
}

.admin-card__header h2 {
    margin: 0 0 1rem;
    font-size: 1.35rem;
}

.admin-form {
    display: grid;
    gap: 1rem;
}

.admin-service-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.admin-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

.admin-field {
    display: grid;
    gap: 0.45rem;
    font-weight: 700;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    font: inherit;
    color: var(--text);
}

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

.admin-section-list {
    display: grid;
    gap: 1rem;
}

.admin-inline-list {
    display: grid;
    gap: 0.85rem;
}

.admin-inline-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) 120px 160px 140px;
    gap: 0.75rem;
    align-items: center;
}

.admin-inline-form input[type="text"],
.admin-inline-form input[type="number"] {
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.86);
    font: inherit;
    color: var(--text);
}

.admin-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 48px;
    padding: 0.75rem 0.95rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

.chart-question-list {
    display: grid;
    gap: 1rem;
}

.chart-question-card {
    padding: 1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--border);
}

.chart-question-card__header {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.chart-question-card__text {
    margin: 0;
    line-height: 1.6;
}

.chart-bars {
    display: grid;
    grid-template-columns: repeat(var(--role-count), minmax(120px, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.chart-bar-card {
    padding: 0.9rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.88);
    display: grid;
    gap: 0.7rem;
    justify-items: center;
    text-align: center;
}

.chart-bar-card--match {
    background: linear-gradient(180deg, rgba(32, 144, 102, 0.16), rgba(255, 255, 255, 0.92));
    border-color: rgba(32, 144, 102, 0.25);
}

.chart-bar-card--mismatch {
    background: linear-gradient(180deg, rgba(185, 79, 63, 0.15), rgba(255, 255, 255, 0.92));
    border-color: rgba(185, 79, 63, 0.24);
}

.chart-bar-card--neutral {
    background: linear-gradient(180deg, rgba(89, 111, 102, 0.1), rgba(255, 255, 255, 0.92));
}

.chart-bar-card__stage {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: end;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 18px;
    background:
        linear-gradient(to top, rgba(25, 50, 41, 0.08) 1px, transparent 1px) 0 100% / 100% 25%,
        rgba(245, 247, 244, 0.95);
}

.chart-bar {
    width: min(56px, 100%);
    border-radius: 16px 16px 10px 10px;
    background: linear-gradient(180deg, #c9d5cf 0%, #95a69d 100%);
    box-shadow: inset 0 -8px 14px rgba(0, 0, 0, 0.08);
}

.chart-bar.bar-high {
    height: 118px;
}

.chart-bar.bar-low {
    height: 62px;
}

.chart-bar.bar-empty {
    height: 18px;
    background: linear-gradient(180deg, #d7dfdb 0%, #a4b3ad 100%);
}

.chart-bar-card--match .chart-bar:not(.bar-empty) {
    background: linear-gradient(180deg, #7fb89c 0%, #2d8768 100%);
}

.chart-bar-card--mismatch .chart-bar:not(.bar-empty) {
    background: linear-gradient(180deg, #f1a294 0%, #c55443 100%);
}

.chart-bar-card--neutral .chart-bar:not(.bar-empty) {
    background: linear-gradient(180deg, #c9d5cf 0%, #95a69d 100%);
}

.chart-bar-card__role {
    font-weight: 800;
}

.chart-bar-card__answer {
    color: var(--muted);
    font-size: 0.95rem;
}

.admin-section-item {
    padding: 1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid var(--border);
}

.admin-section-item__top,
.admin-question-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
}

.admin-section-item h3 {
    margin: 0.5rem 0 0.35rem;
    font-size: 1.2rem;
}

.admin-section-item p,
.admin-question-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.admin-question-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.admin-question-item {
    padding-top: 0.85rem;
    border-top: 1px solid rgba(25, 50, 41, 0.08);
}

.admin-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: rgba(31, 107, 82, 0.12);
    color: var(--primary-strong);
    font-size: 0.85rem;
    font-weight: 800;
}

.admin-empty {
    margin: 0;
    color: var(--muted);
}

.danger-button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    min-height: 44px;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #b94f3f 0%, #9f392b 100%);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.danger-button--ghost {
    background: rgba(185, 79, 63, 0.12);
    color: #9f392b;
    border: 1px solid rgba(185, 79, 63, 0.2);
}

.field-error--inline {
    padding-left: 0;
}

.question-list {
    display: grid;
    gap: 1rem;
}

.question-card {
    padding: 1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
}

.question-card__header {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.question-card__index {
    width: 52px;
    height: 52px;
    display: inline-grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(31, 107, 82, 0.16), rgba(255, 255, 255, 0.95));
    color: var(--primary-strong);
    font-weight: 800;
}

.question-card__text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.answer-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-left: calc(52px + 0.9rem);
}

.answer-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.answer-pill input {
    position: absolute;
    opacity: 0;
    inset: 0;
}

.answer-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    font-weight: 700;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.answer-pill:hover span,
.answer-pill:focus-within span {
    transform: translateY(-1px);
    border-color: rgba(31, 107, 82, 0.3);
}

.answer-pill input:checked + span {
    background: linear-gradient(135deg, rgba(31, 107, 82, 0.16), rgba(255, 255, 255, 0.96));
    border-color: rgba(31, 107, 82, 0.48);
    box-shadow: 0 14px 30px rgba(31, 107, 82, 0.12);
}

.field-error {
    margin: 0.75rem 0 0;
    padding-left: calc(52px + 0.9rem);
    color: #aa3f31;
    font-size: 0.92rem;
    font-weight: 700;
}

.summary-panel {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.summary-stat {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border);
}

.summary-stat strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 2rem;
    font-weight: 800;
}

.summary-stat__label {
    color: var(--muted);
    font-weight: 700;
}

.primary-button,
.secondary-link {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 1rem 1.3rem;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
}

.primary-button {
    background: linear-gradient(135deg, var(--primary) 0%, #2c8467 100%);
    color: #fff;
    box-shadow: 0 18px 34px rgba(31, 107, 82, 0.22);
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 22px 40px rgba(31, 107, 82, 0.28);
    filter: saturate(1.06);
}

.secondary-link {
    color: var(--primary-strong);
    border: 1px solid rgba(31, 107, 82, 0.24);
    background: rgba(255, 255, 255, 0.72);
}

.secondary-link--button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.primary-button:focus-visible,
.role-card input:focus-visible + .role-card__content,
.answer-pill input:focus-visible + span {
    outline: 3px solid rgba(255, 184, 77, 0.65);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .site-header__inner {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .site-auth {
        min-width: 0;
    }

    .site-auth__form,
    .site-auth__status {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .hero-panel,
    .hero-panel--single,
    .survey-layout,
    .admin-layout,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .survey-sidebar {
        position: static;
    }

    .partner-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .page-shell,
    .page-shell--survey {
        width: min(100% - 1rem, 100%);
        padding: 0.75rem 0;
    }

    .hero-copy,
    .form-panel,
    .survey-sidebar,
    .survey-panel {
        border-radius: 24px;
    }

    .hero-copy,
    .survey-sidebar,
    .survey-panel,
    .form-panel {
        padding: 1rem;
    }

    .question-card__header {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 0.75rem;
    }

    .question-card__index {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .answer-options,
    .field-error {
        padding-left: 0;
    }

    .answer-pill {
        flex: 1 1 100%;
    }

    .answer-pill span,
    .primary-button,
    .secondary-link,
    .danger-button {
        width: 100%;
        min-width: 0;
    }

    .site-auth__form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .site-auth__form input {
        width: 100%;
    }

    .partner-showcase {
        margin-top: 1.25rem;
    }

    .partner-grid {
        gap: 0.6rem;
    }

    .partner-card {
        min-height: 110px;
        padding: 0.6rem;
        border-radius: 16px;
    }

    .partner-card img {
        max-height: 82px;
    }

    .admin-section-item__top,
    .admin-question-item {
        flex-direction: column;
    }

    .chart-bars {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compact-board__header {
        flex-direction: column;
    }

    .compact-board__actions {
        width: 100%;
        min-width: 0;
    }

    .compact-matrix {
        grid-template-columns: minmax(240px, 1.6fr) repeat(2, minmax(100px, 1fr));
        overflow-x: auto;
    }

    .micro-card__header {
        flex-direction: column;
    }

    .micro-legend {
        justify-content: flex-start;
    }

    .micro-grid {
        grid-template-columns: 56px repeat(2, minmax(90px, 1fr));
        overflow-x: auto;
    }

    .admin-inline-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 460px) {
    .partner-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .chart-question-card__header {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 0.75rem;
    }

    .chart-bars {
        grid-template-columns: 1fr;
    }

    .compact-matrix {
        display: flex;
        flex-direction: column;
    }

    .compact-matrix__header {
        display: none;
    }

    .compact-matrix__question,
    .compact-cell {
        min-height: unset;
    }

    .micro-grid {
        display: flex;
        flex-direction: column;
    }

    .micro-grid__head {
        display: none;
    }
}
