@font-face {
    font-family: "Roboto";
    src: url("/assets/fonts/Roboto-VariableFont_wdth,wght.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: light;
    --brand: #c8102e;
    --brand-dark: #a40d27;
    --brand-soft: #fff1f3;
    --text: #1d2530;
    --muted: #657181;
    --border: #e3e8ee;
    --rating-bg: #f8f9fb;
    font-family: "Roboto", Arial, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html,
body {
    font-family: "Roboto", Arial, sans-serif;
}
body {
    min-width: 320px;
    margin: 0;
    background: linear-gradient(135deg, #f6f8fb 0%, #f8f5f7 55%, #f4f6fa 100%);
}
button, input, textarea, select { font: inherit; }
.page-shell { min-height: 100vh; }

/* Informational invitation states only. */
.status-page { position: relative; min-height: 100vh; min-height: 100dvh; isolation: isolate; background: #fafafc; }
.status-page-shell { position: relative; z-index: 1; display: flex; min-height: 100vh; min-height: 100dvh; align-items: center; justify-content: center; padding: 40px 0; }
.status-card { width: calc(100% - 40px); max-width: 720px; padding: 40px 48px; border: 1px solid #e7e9ef; border-radius: 18px; background: #fff; box-shadow: 0 12px 40px rgba(25, 35, 52, .07); text-align: center; }
.status-card__logo { display: block; width: 130px; height: auto; margin: 0 auto; }
.status-card__icon { display: flex; width: 76px; height: 76px; align-items: center; justify-content: center; margin: 28px auto 24px; border-radius: 50%; }
.status-card__icon img { width: 38px; height: 38px; }
.status-card--success .status-card__icon { background: #eaf7f0; }
.status-card--failure .status-card__icon { background: #fcedef; }
.status-card--completed .status-card__icon { background: #edf3f9; }
.status-card--unavailable .status-card__icon { background: #fcedef; }
.status-card h1 { margin: 0; color: #202d43; font-size: 30px; font-weight: 600; letter-spacing: 0; line-height: 1.25; }
.status-card__message { max-width: 560px; margin: 18px auto 0; color: #58677d; font-size: 16px; font-weight: 400; line-height: 1.6; }
.status-card__secondary { max-width: 560px; margin: 10px auto 0; color: #758198; font-size: 14px; font-weight: 400; line-height: 1.6; }
.status-card__footer { margin-top: 35px; padding-top: 18px; border-top: 1px solid #e7e9ef; color: #758198; font-size: 12px; font-weight: 400; line-height: 18px; }
.status-background-waves { position: absolute; right: 0; bottom: 0; left: 0; z-index: 0; width: 100%; height: 100px; pointer-events: none; }
.status-background-waves svg { display: block; width: 100%; height: 100%; }

/* Survey-page decoration stays at the end of the document, never in the viewport. */
.survey-page { position: relative; min-height: 100vh; min-height: 100dvh; isolation: isolate; }
.survey-page .page-shell { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; padding: 20px 0 36px; }
.survey-page .survey-card { position: relative; margin: 0 auto; }
.survey-background-waves { position: absolute; right: 0; bottom: 0; left: 0; z-index: 0; width: 100%; height: 130px; pointer-events: none; }
.survey-background-waves svg { display: block; width: 100%; height: 100%; }

.survey-card, .landing-card {
    width: calc(100% - 36px);
    max-width: 820px;
    margin: 20px auto 36px;
    padding: 28px 34px 30px;
    background: #fff;
    border: 1px solid #e5e8ee;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(29, 37, 48, .045);
}

.survey-header { padding: 6px 0 18px; border: 0; }
.header-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 24px; }
.header-title-block { align-self: start; }
.survey-header .brand-row { display: flex; min-height: 42px; align-items: flex-start; justify-self: end; align-self: start; margin: 0; }
.survey-header .brand-logo { display: block; width: 146px; height: auto; margin-top: 2px; object-fit: contain; object-position: left center; }
h1 { margin: 0; color: var(--text); font-size: 26px; font-weight: 600; letter-spacing: -.45px; line-height: 32px; }
.header-title-block h1 { max-width: none; }
.header-title-block p { max-width: 620px; margin: 10px 0 0; color: var(--muted); font-size: 14px; font-weight: 400; line-height: 21px; }
.header-divider { width: 100%; height: 2px; margin: 18px 0 0; border: 0; background: linear-gradient(to right, var(--brand) 0 86px, #dce2e8 86px 100%); }

.survey-form { padding: 0; }
.question-section { min-width: 0; margin: 0; padding: 20px 0; border: 0; border-bottom: 1px solid var(--border); }
.question-section:first-child { padding-top: 0; }
.question-section:not(:first-child) { padding-top: 26px; }
.question-heading { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; align-items: start; width: 100%; margin: 0; color: var(--text); font-size: 15px; font-weight: 400; letter-spacing: 0; line-height: 23px; }
.question-number { display: inline-flex; width: 30px; height: 30px; flex: 0 0 30px; align-items: center; justify-content: center; border-radius: 50%; background: #f5f0f2; color: #c82342; font-family: "Roboto", Arial, sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .2px; line-height: 2; }
.rating-fieldset { min-inline-size: 0; margin: 12px 0 0; padding: 0; border: 0; }
.rating-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: auto; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: var(--rating-bg); }
.rating-option { position: relative; display: flex; min-height: 70px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 9px 6px 8px; border-right: 1px solid var(--border); background: transparent; color: #344151; cursor: pointer; font-size: 13px; font-weight: 500; line-height: 15px; text-align: center; transition: color 120ms ease, background-color 120ms ease, box-shadow 120ms ease; }
.rating-option:last-child { border-right: 0; }
.rating-option input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.rating-icon { width: 22px; height: 22px; color: #596677; }
.rating-icon svg { display: block; width: 100%; height: 100%; }
.rating-label { color: inherit; }
.rating-option:has(input:checked) { background: #fff0f2; color: #a50e29; box-shadow: inset 0 -2px 0 var(--brand); font-weight: 500; }
.rating-option:has(input:checked) .rating-icon { color: var(--brand); }
.rating-option:has(input:focus-visible) { z-index: 1; outline: 2px solid var(--brand); outline-offset: -2px; }
@media (hover: hover) { .rating-option:hover { background: #f5f6f8; } .rating-option:has(input:checked):hover { background: #fff0f2; } }
.field-error { margin: 8px 0 0 40px; color: var(--brand-dark); font-size: 12px; line-height: 18px; }

.comments-section { padding-top: 20px; }
.comments-section > label { display: flex; align-items: center; gap: 0; margin: 0; color: var(--text); font-size: 15px; font-weight: 500; line-height: 22px; }
.comments-label-icon { width: 18px; height: 18px; flex: 0 0 18px; margin-right: 9px; }
.comments-optional { margin-left: 8px; color: #9aa4b1; font-size: 11px; font-weight: 400; }
textarea { display: block; width: 100%; min-height: 96px; margin-top: 10px; padding: 12px 14px; border: 1px solid #dde3e9; border-radius: 8px; background: #fff; box-shadow: none; color: var(--text); font-family: "Roboto", Arial, sans-serif; font-size: 14px; line-height: 21px; resize: vertical; transition: border-color 120ms ease, outline-color 120ms ease; }
textarea::placeholder { color: #8f99a5; opacity: 1; }
textarea:focus-visible { outline: 2px solid rgba(200, 16, 46, .12); border-color: var(--brand); }
.character-count { margin: 5px 0 0; color: #9aa4b1; font-size: 11px; text-align: right; }

.submit-area { width: 100%; margin-top: 20px; }
.submit-button { display: flex; width: 100%; height: 48px; min-width: 0; align-items: center; justify-content: center; gap: 10px; padding: 0 20px; border: 0; border-radius: 8px; background: #c8102e; box-shadow: none; color: #fff; cursor: pointer; font-family: "Roboto", Arial, sans-serif; font-size: 14px; font-weight: 600; line-height: 20px; transition: background-color 150ms ease; }
.submit-button svg { width: 16px; height: 16px; flex: 0 0 16px; }
.submit-button:not(:disabled):hover { background: #a90d27; }
.submit-button:focus-visible { outline: 2px solid #c8102e; outline-offset: 3px; }
.submit-button:disabled { background: #d8dde2; color: #6c7580; cursor: not-allowed; box-shadow: none; }
.survey-form[data-preview="true"] .submit-button:disabled { background: #bf6b7a; color: #fff; opacity: 1; }
.preview-note { margin: 12px 0 0; color: #929caa; font-size: 11.5px; line-height: 18px; text-align: center; }
.survey-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #e5e9ee; color: #98a2ae; font-family: "Roboto", Arial, sans-serif; font-size: 11.5px; font-weight: 400; line-height: 18px; }

.landing-card { min-height: 0; }
.landing-logo { width: 126px; margin-bottom: 17px; }
.landing-card h1 { max-width: 600px; }
.lead { max-width: 600px; margin: 7px 0 0; color: var(--muted); font-size: 14.5px; font-weight: 400; line-height: 22px; }
.muted, .technical-detail { max-width: 600px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 20px; }
.text-link { display: inline-block; margin-top: 16px; color: var(--brand); font-size: 13px; font-weight: 500; }
.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: 767px) {
    .survey-card, .landing-card { width: calc(100% - 24px); margin-top: 12px; padding: 24px 22px; }
    .header-grid { column-gap: 18px; }
    .survey-header .brand-logo { width: 132px; }
    .landing-logo { width: 116px; }
    h1 { font-size: 24px; line-height: 31px; }
    .header-title-block h1 { line-height: 30px; }
    .lead { font-size: 14.5px; }
    .question-heading { font-size: 14.5px; line-height: 22px; }
    .survey-page .page-shell { padding: 12px 0 36px; }
    .survey-background-waves { height: 65px; }
    .status-page-shell { align-items: flex-start; padding: 28px 0; }
    .status-card { width: calc(100% - 32px); padding: 28px 22px; border-radius: 14px; }
    .status-card__logo { width: 120px; }
    .status-card__icon { width: 64px; height: 64px; margin: 22px auto 18px; }
    .status-card__icon img { width: 32px; height: 32px; }
    .status-card h1 { font-size: clamp(23px, 6vw, 26px); }
    .status-background-waves { height: 55px; }
}

@media (max-width: 599px) {
    body { background: #fff; }
    .survey-card, .landing-card { width: 100%; max-width: none; margin: 0; padding: 20px 16px 28px; border: 0; border-radius: 0; box-shadow: none; }
    .survey-page .page-shell { padding: 0; }
    .header-grid { display: flex; flex-direction: column; align-items: center; text-align: center; }
    .survey-header .brand-row { order: 1; min-height: 0; margin: 0 auto 14px; justify-self: center; }
    .survey-header .brand-logo { width: 122px; margin-top: 0; }
    .header-title-block { order: 2; width: 100%; }
    .header-title-block h1 { font-size: 23px; line-height: 29px; text-align: center; }
    .header-title-block p { max-width: 100%; margin-top: 8px; text-align: center; }
    .header-divider { margin-top: 16px; }
    .landing-logo { width: 108px; }
    h1 { font-size: 23px; line-height: 29px; }
    .question-section { padding-top: 20px; padding-bottom: 20px; }
    .question-section:not(:first-child) { padding-top: 26px; }
    .question-heading { grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; font-size: 14px; line-height: 22px; }
    .rating-options { width: 100%; margin-left: 0; }
    .field-error { margin-left: 0; }
    .submit-button { width: 100%; height: 48px; border-radius: 8px; }
    .preview-note { text-align: center; }
    .survey-footer { flex-direction: column; align-items: center; justify-content: center; gap: 4px; margin-top: 22px; padding-top: 14px; text-align: center; }
}

@media (max-width: 390px) {
    .rating-options { grid-template-columns: 1fr; gap: 5px; overflow: visible; border: 0; border-radius: 0; background: transparent; }
    .rating-option { min-height: 40px; flex-direction: row; justify-content: flex-start; gap: 9px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; text-align: left; }
    .rating-option:last-child { border-right: 1px solid var(--border); }
    .rating-option:has(input:checked) { border-color: var(--brand); box-shadow: none; }
    .rating-icon { flex: 0 0 21px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }

/* Root landing page only. Survey and result layouts intentionally remain unchanged. */
.landing-page { min-width: 320px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #fafafc; color: #202d43; font-family: "Roboto", Arial, sans-serif; }
.landing-page .landing-header { height: 86px; border-bottom: 1px solid #e7e9ef; background: #fff; }
.landing-header__inner, .landing-footer > div { width: min(1340px, calc(100% - 64px)); height: 100%; margin: 0 auto; display: flex; align-items: center; }
.landing-header__logo { display: block; width: 128px; height: auto; }
.landing-main { flex: 1 0 auto; display: flex; flex-direction: column; background: radial-gradient(ellipse at 78% 39%, #fff1f4 0%, #fafafc 58%, #f8f9fc 100%); }
.landing-hero { width: min(1240px, calc(100% - 64px)); min-height: 468px; margin: 0 auto; padding: 58px 0 40px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 64px; align-items: center; }
.landing-kicker { display: flex; align-items: center; gap: 13px; margin: 0; color: #58677d; font-size: 14px; font-weight: 700; letter-spacing: 3px; line-height: 18px; }
.landing-kicker span { width: 35px; height: 4px; flex: 0 0 35px; border-radius: 2px; background: #e6002d; }
.landing-hero h1 { margin: 32px 0 22px; color: #202d43; font-family: "Roboto", Arial, sans-serif; font-size: clamp(40px, 4vw, 58px); font-weight: 700; letter-spacing: -1.4px; line-height: 1.13; }
.landing-hero h1 em { color: #e6002d; font-style: normal; }
.landing-description { max-width: 610px; margin: 0 0 32px; color: #58677d; font-size: 20px; font-weight: 400; line-height: 1.5; }
.landing-notice { display: flex; align-items: center; gap: 22px; width: 100%; max-width: 620px; min-height: 94px; padding: 20px 26px; border: 1px solid #f9dce3; border-radius: 11px; background: linear-gradient(90deg, #fff2f5, #fceef1); }
.landing-notice__icon { width: 48px; flex: 0 0 48px; text-align: center; }
.landing-notice__icon svg { width: 36px; height: 36px; stroke: #e6002d; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.landing-notice__rule { width: 1px; height: 48px; flex: 0 0 1px; background: #f4d4dc; }
.landing-notice strong { display: block; color: #172337; font-size: 17px; font-weight: 700; line-height: 22px; }
.landing-notice p { margin: 5px 0 0; color: #58677d; font-size: 15px; line-height: 21px; }
.landing-hero__art { display: flex; justify-content: center; align-items: center; min-width: 0; }
.landing-hero__art img { display: block; width: 100%; max-width: 540px; height: auto; margin-inline: auto; object-fit: contain; }
.landing-features { width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: 24px 0; border-top: 1px solid #e7e9ef; display: grid; grid-template-columns: repeat(3, 1fr); }
.landing-features article { min-width: 0; display: flex; align-items: center; gap: 20px; padding: 0 32px; }
.landing-features article:first-child { padding-left: 0; }
.landing-features article + article { border-left: 1px solid #e0e5ec; }
.landing-features article > img { width: 40px; height: 40px; flex: 0 0 40px; }
.landing-features h2 { margin: 0; color: #172337; font-size: 20px; font-weight: 700; line-height: 25px; }
.landing-features p { margin: 3px 0 0; color: #58677d; font-size: 15px; line-height: 21px; }
.landing-waves { height: 100px; margin-top: auto; overflow: hidden; pointer-events: none; }
.landing-waves svg { display: block; width: 100%; height: 100%; }
.landing-footer { min-height: 64px; flex-shrink: 0; display: flex; align-items: center; border-top: 1px solid #e7e9ef; background: #fff; color: #647189; font-size: 14px; line-height: 20px; }
.landing-footer > div { height: auto; }

@media (max-width: 1199px) {
    .landing-hero { gap: 32px; }
    .landing-description { font-size: 17px; }
    .landing-features article { padding: 0 20px; }
}
@media (max-width: 767px) {
    .landing-page .landing-header { height: 72px; }
    .landing-header__inner, .landing-footer > div { width: calc(100% - 40px); }
    .landing-header__logo { width: 105px; }
    .landing-hero { width: calc(100% - 40px); grid-template-columns: 1fr; gap: 26px; min-height: 0; padding: 45px 0 36px; }
    .landing-hero h1 { margin-top: 26px; font-family: "Roboto", Arial, sans-serif; font-size: clamp(34px, 8vw, 42px); font-weight: 700; letter-spacing: -1.2px; line-height: 1.12; }
    .landing-description { margin-bottom: 26px; font-size: 16px; }
    .landing-notice { gap: 14px; padding: 17px; }
    .landing-notice__icon { width: 38px; flex-basis: 38px; }
    .landing-notice__rule { height: 50px; }
    .landing-notice strong { font-size: 16px; }
    .landing-notice p { font-size: 14px; }
    .landing-hero__art { order: 2; }
    .landing-hero__art img { max-width: 430px; }
    .landing-features { width: calc(100% - 40px); grid-template-columns: 1fr; padding: 12px 0 20px; }
    .landing-features article, .landing-features article:first-child { padding: 20px 0; }
    .landing-features article + article { border-left: 0; border-top: 1px solid #e0e5ec; }
    .landing-waves { height: 55px; }
}

@media (max-height: 820px) and (min-width: 768px) {
    .landing-hero { min-height: 422px; padding-top: 40px; padding-bottom: 28px; }
    .landing-hero__art img { max-width: 480px; }
    .landing-hero h1 { margin-top: 24px; margin-bottom: 16px; }
    .landing-description { margin-bottom: 22px; }
    .landing-features { padding-top: 18px; padding-bottom: 18px; }
}
