@import url("https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700;800&display=swap");

:root {
    --blue: #03a207;
    --blue-dark: #017504;
    --green-soft: #e9f9ea;
    --gold: #03a207;
    --orange: #03a207;
    --ink: #101827;
    --muted: #5f6c7b;
    --line: #dfe8df;
    --soft: #f5faf5;
    --white: #ffffff;
    --danger: #b42318;
    --success: #166534;
    --shadow: 0 24px 70px rgba(16, 24, 39, 0.11);
}

* {
    box-sizing: border-box;
}

html {
    font-family: Jost, Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f0fbf1 0, #ffffff 46%, #f7faf7 100%);
}

body {
    position: relative;
    margin: 0;
    min-height: 100vh;
}

body::before {
    position: absolute;
    inset: 0 0 auto;
    z-index: 0;
    height: 390px;
    content: "";
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(240, 251, 241, 0.76) 72%, rgba(255, 255, 255, 0.98) 100%),
        url("header-04.jpg") center 38% / cover no-repeat;
}

body::after {
    position: absolute;
    inset: 0 0 auto;
    z-index: 0;
    height: 390px;
    content: "";
    background: rgba(3, 162, 7, 0.08);
}

button,
input,
textarea {
    font: inherit;
}

.shell {
    position: relative;
    z-index: 1;
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 64px;
}

.masthead {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    min-height: 270px;
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.masthead::after {
    position: absolute;
    inset: auto 0 0;
    height: 7px;
    content: "";
    background: linear-gradient(90deg, var(--blue), rgba(3, 162, 7, 0.2));
}

.masthead > * {
    position: relative;
    z-index: 1;
}

.masthead img {
    display: block;
    width: 210px;
    height: auto;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--orange);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
    color: var(--blue-dark);
    font-size: clamp(32px, 4.8vw, 58px);
    line-height: 1.08;
    letter-spacing: 0;
}

.masthead p:last-child,
.branch-title p,
.question-head p,
.muted,
.form-actions p {
    color: var(--muted);
}

.feedback-form,
.admin-section,
.login-box,
.notice {
    margin-top: 18px;
}

.question,
.branch-title,
.notice,
.login-box,
.admin-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 14px 35px rgba(16, 24, 39, 0.055);
}

.question,
.branch-title,
.notice,
.login-box {
    padding: 24px;
}

.question {
    margin-top: 16px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.question:focus-within {
    border-color: rgba(3, 162, 7, 0.48);
    box-shadow: 0 18px 42px rgba(3, 162, 7, 0.1);
}

.question-title {
    display: block;
    margin-bottom: 12px;
    color: var(--blue-dark);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.question-title span {
    color: var(--orange);
}

.question-head p {
    margin-bottom: 16px;
    font-size: 14px;
}

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

.segmented label,
.choice {
    cursor: pointer;
}

.segmented input,
.choice input[type="radio"],
.choice input[type="checkbox"],
.scale input {
    accent-color: var(--blue);
}

.segmented span,
.choice {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfefb;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.segmented input {
    position: absolute;
    opacity: 0;
}

.segmented input:checked + span {
    border-color: var(--blue);
    color: var(--blue-dark);
    background: #effbef;
    box-shadow: inset 0 0 0 2px rgba(3, 162, 7, 0.16);
}

.choice:has(input:checked) {
    border-color: rgba(3, 162, 7, 0.55);
    background: var(--green-soft);
}

.branch[hidden] {
    display: none;
}

.branch-title {
    margin-top: 18px;
    border-left: 6px solid var(--gold);
}

.branch-title h2,
.admin-section h2 {
    margin-bottom: 8px;
    color: var(--blue-dark);
}

textarea,
input[type="text"],
input[type="password"] {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 13px 14px;
    color: var(--ink);
    background: #fbfefb;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus {
    outline: 3px solid rgba(3, 162, 7, 0.22);
    border-color: var(--gold);
    background: var(--white);
}

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

.option-stack {
    display: grid;
    gap: 10px;
}

.choice-other {
    display: grid;
    grid-template-columns: auto auto 1fr;
}

.scale {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) auto minmax(140px, 1fr);
    gap: 14px;
    align-items: center;
}

.scale > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.scale > span:last-child {
    text-align: right;
}

.scale-options {
    display: grid;
    grid-template-columns: repeat(6, 44px);
    gap: 8px;
}

.scale-options label {
    position: relative;
}

.scale-options input {
    position: absolute;
    opacity: 0;
}

.scale-options b {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fbfefb;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.scale-options input:checked + b {
    border-color: var(--blue);
    color: var(--white);
    background: var(--blue);
}

.field-error {
    margin: 12px 0 0;
    color: var(--danger);
    font-size: 14px;
    font-weight: 700;
}

.has-error {
    border-color: rgba(180, 35, 24, 0.45);
}

.form-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
}

button,
.admin-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    padding: 0 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(3, 162, 7, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

button:hover,
.admin-actions a:hover {
    background: linear-gradient(135deg, #05b909, var(--blue-dark));
    box-shadow: 0 18px 38px rgba(3, 162, 7, 0.28);
    transform: translateY(-1px);
}

.notice.success {
    border-color: rgba(22, 101, 52, 0.3);
    color: var(--success);
    background: #f0fdf4;
}

.notice.error {
    border-color: rgba(180, 35, 24, 0.3);
    color: var(--danger);
    background: #fff5f5;
}

.login-box {
    width: min(460px, 100%);
}

.answer-list {
    margin: 16px 0 0;
    padding: 0;
    max-height: 340px;
    overflow-y: auto;
    list-style: none;
    display: grid;
    gap: 10px;
}

.answer-list li {
    border: 1px solid var(--line);
    border-left: 3px solid var(--blue);
    border-radius: 8px;
    padding: 12px 14px;
    background: var(--soft);
    text-align: left;
}

.answer-list p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}

.answer-list time {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.thanks-card {
    margin-top: 26px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 44px 32px;
    text-align: center;
    background: var(--white);
    box-shadow: var(--shadow);
}

.thanks-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    box-shadow: 0 16px 34px rgba(3, 162, 7, 0.22);
}

.thanks-card h2 {
    margin: 20px 0 8px;
    font-size: 30px;
}

.thanks-card p {
    margin: 0 auto;
    max-width: 52ch;
}

.thanks-card p + p {
    margin-top: 12px;
}

.thanks-actions {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.thanks-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 8px;
    padding: 0 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(3, 162, 7, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.thanks-actions a:hover {
    background: linear-gradient(135deg, #05b909, var(--blue-dark));
    box-shadow: 0 18px 38px rgba(3, 162, 7, 0.28);
    transform: translateY(-1px);
}

.login-box label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

.login-box button {
    margin-top: 16px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.summary,
.stats-grid {
    display: grid;
    gap: 14px;
}

.summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
}

.summary article,
.stat-card,
.response-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 14px 35px rgba(16, 24, 39, 0.055);
}

.summary article {
    padding: 22px;
}

.summary b,
.stat-big {
    display: block;
    color: var(--blue);
    font-size: 34px;
    font-weight: 800;
}

.admin-section {
    padding: 22px;
}

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

.stat-card {
    padding: 18px;
}

.stat-card h3 {
    font-size: 15px;
    line-height: 1.35;
}

.bar-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 9px;
    padding: 10px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--soft);
}

.bar-row span,
.bar-row b {
    position: relative;
    z-index: 1;
}

.bar-row i {
    position: absolute;
    inset: 0 auto 0 0;
    background: rgba(3, 162, 7, 0.18);
}

.responses-list {
    display: grid;
    gap: 10px;
}

.response-item summary {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
}

.response-item dl {
    margin: 0;
    padding: 0 16px 16px;
}

.response-item dt {
    margin-top: 14px;
    color: var(--blue-dark);
    font-weight: 800;
}

.response-item dd {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    body::before,
    body::after {
        height: 360px;
    }

    .shell {
        width: min(100% - 20px, 960px);
        padding-top: 18px;
    }

    .masthead,
    .segmented,
    .option-grid,
    .scale,
    .summary,
    .stats-grid,
    .form-actions {
        grid-template-columns: 1fr;
    }

    .masthead {
        min-height: 0;
        padding: 22px;
        background: rgba(255, 255, 255, 0.94);
    }

    .masthead img {
        width: 190px;
    }

    .scale-options {
        grid-template-columns: repeat(6, minmax(36px, 1fr));
    }

    .scale-options b {
        width: 100%;
        height: 42px;
    }

    .choice-other {
        grid-template-columns: auto 1fr;
    }

    .choice-other input[type="text"] {
        grid-column: 1 / -1;
    }

    .form-actions {
        display: grid;
        align-items: stretch;
    }
}

