* {
    box-sizing: border-box;
}

:root {
    --bg: #f6f7fb;
    --card: rgba(255, 255, 255, 0.9);
    --card-solid: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #fb6a2a;
    --primary-dark: #db4e12;
    --secondary: #111827;
    --success-bg: #ecfdf5;
    --success-text: #047857;
    --error-bg: #fef2f2;
    --error-text: #b91c1c;
    --shadow: 0 24px 60px rgba(17, 24, 39, 0.10);
    --radius: 24px;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(251, 106, 42, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(17, 24, 39, 0.10), transparent 28rem),
        var(--bg);
    color: var(--text);
}

a {
    color: inherit;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 64px;
}

.page-narrow {
    width: min(980px, calc(100% - 32px));
}

.hero {
    min-height: 300px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: center;
    padding: 16px 0 24px;
}

.hero__content h1,
.topbar h1 {
    margin: 10px 0;
    letter-spacing: -0.05em;
    line-height: 1;
    font-size: clamp(1.8rem, 5vw, 3.6rem);
}

.topbar h1 {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
}

.hero__content p,
.topbar p,
.section-title p,
.panel__header p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero__actions,
.topbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.hero__summary {
    padding: 20px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 20px 50px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(18px);
}

.hero__summary-icon {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    font-size: 1.6rem;
}

.hero__summary h2 {
    margin: 12px 0 6px;
    font-size: 1.3rem;
    letter-spacing: -0.04em;
}

.hero__summary p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.summary-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.summary-pills span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 11px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--line);
    font-weight: 800;
    font-size: .86rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    font-weight: 800;
    font-size: 0.82rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 0;
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    font-size: 0.95rem;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 14px 28px rgba(251, 106, 42, 0.25);
}

.btn-secondary {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--secondary);
}

.btn-large {
    min-height: 54px;
    padding-inline: 26px;
}

.hero__card {
    position: relative;
    min-height: 360px;
    border-radius: 36px;
    background:
        linear-gradient(145deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.82)),
        url("data:image/svg+xml,%3Csvg width='800' height='800' viewBox='0 0 800 800' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.08'%3E%3Cpath d='M0 120H800M0 240H800M0 360H800M0 480H800M0 600H800M0 720H800'/%3E%3Cpath d='M120 0V800M240 0V800M360 0V800M480 0V800M600 0V800M720 0V800'/%3E%3C/g%3E%3C/svg%3E");
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero__card::before {
    content: "";
    position: absolute;
    inset: 18%;
    border-radius: 999px;
    background: rgba(251, 106, 42, 0.42);
    filter: blur(60px);
}

.floating-card {
    position: absolute;
    width: 210px;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
    backdrop-filter: blur(16px);
}

.floating-card span {
    font-size: 2.2rem;
}

.floating-card strong {
    display: block;
    margin-top: 10px;
    font-size: 1.15rem;
}

.floating-card small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.floating-card:nth-child(1) { top: 38px; left: 42px; }
.floating-card:nth-child(2) { top: 150px; right: 38px; }
.floating-card:nth-child(3) { bottom: 52px; left: 58px; }
.floating-card:nth-child(4) { bottom: 26px; right: 46px; }

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 6px 0 30px;
}

.steps article,
.panel,
.response-card,
.detail-card,
.empty-state,
.submit-bar {
    background: var(--card);
    border: 1px solid rgba(229, 231, 235, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.steps article {
    padding: 16px;
    border-radius: var(--radius);
}

.steps span {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #111827;
    color: white;
    font-weight: 900;
}

.steps strong {
    display: block;
    margin-top: 10px;
    font-size: 1rem;
}

.steps p {
    color: var(--muted);
    margin-bottom: 0;
}

.form-shell {
    padding-top: 8px;
}

.section-title {
    margin-bottom: 18px;
}

.section-title h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.6rem);
    line-height: 1;
    letter-spacing: -0.05em;
    margin: 8px 0;
}

.section-title > span {
    color: var(--primary-dark);
    font-weight: 900;
}

.briefing-form {
    display: grid;
    gap: 14px;
}

.panel {
    padding: 18px 20px;
    border-radius: var(--radius);
}

.panel__header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.panel__header > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel__header h3 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: -0.03em;
}

.panel__header p {
    max-width: 480px;
    margin: 0;
    font-size: .94rem;
}

.mini-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 16px;
    font-size: 1.35rem;
}

.grid-2,
.grid-3 {
    display: grid;
    gap: 12px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    font-weight: 800;
    font-size: .92rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 11px 13px;
    font: inherit;
    background: white;
    color: var(--text);
    outline: none;
    transition: border .18s ease, box-shadow .18s ease;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(251, 106, 42, .65);
    box-shadow: 0 0 0 5px rgba(251, 106, 42, .12);
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.option-grid.small {
    grid-template-columns: repeat(4, 1fr);
}

.option-card,
.radio-card {
    position: relative;
    min-height: 128px;
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: white;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border .18s ease, background .18s ease;
}

.option-card:hover,
.radio-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(17, 24, 39, 0.10);
}

.option-card input,
.radio-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-card:has(input:checked),
.radio-card:has(input:checked) {
    border-color: rgba(251, 106, 42, .75);
    background: linear-gradient(180deg, #fff7ed, white);
    box-shadow: 0 18px 34px rgba(251, 106, 42, .16);
}

.option-card:has(input:checked)::after,
.radio-card:has(input:checked)::after {
    content: "✓";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    font-weight: 900;
}

.option-card__icon,
.radio-card > span {
    font-size: 1.6rem;
}

.option-card strong,
.radio-card strong {
    font-size: .92rem;
    line-height: 1.2;
}

.option-card small,
.radio-card small {
    color: var(--muted);
    line-height: 1.45;
}

.conditional {
    display: none;
}

.conditional.is-visible {
    display: block;
}

.radio-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.sub-block {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.sub-block h4 {
    margin: 0 0 14px;
}

.submit-bar {
    position: sticky;
    bottom: 16px;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-radius: 999px;
    padding: 10px 14px 10px 18px;
}

.submit-bar small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}

code {
    padding: 2px 6px;
    border-radius: 8px;
    background: #f3f4f6;
}

.alert {
    padding: 16px 18px;
    border-radius: 20px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert ul {
    margin-bottom: 0;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: #fecaca;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: #a7f3d0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
}

.responses {
    display: grid;
    gap: 14px;
}

.response-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius);
}

.response-card__main {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.response-card h2 {
    margin: 0 0 6px;
    letter-spacing: -0.03em;
}

.response-card p {
    margin: 0 0 12px;
    color: var(--muted);
}

.response-card__side {
    display: grid;
    gap: 12px;
    justify-items: end;
}

.response-card__side small {
    color: var(--muted);
}

.avatar {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    font-size: 1.4rem;
    flex: 0 0 auto;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.muted {
    color: var(--muted);
}

.empty-state {
    text-align: center;
    padding: 54px 24px;
    border-radius: var(--radius);
}

.empty-state > span {
    font-size: 4rem;
}

.empty-state h1,
.empty-state h2 {
    margin-bottom: 8px;
    letter-spacing: -0.04em;
}

.empty-state p {
    color: var(--muted);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-card {
    padding: 16px 18px;
    border-radius: var(--radius);
}

.detail-card.wide {
    grid-column: 1 / -1;
}

.detail-card h2 {
    margin: 0 0 16px;
    letter-spacing: -0.03em;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.info-row:last-child {
    border-bottom: 0;
}

.info-row span {
    color: var(--muted);
}

.info-row strong {
    text-align: right;
}

.long-text {
    color: #374151;
    line-height: 1.7;
    margin-bottom: 0;
    white-space: normal;
}

@media print {
    body {
        background: white;
    }

    .btn,
    .topbar__actions {
        display: none !important;
    }

    .page {
        width: 100%;
        padding: 0;
    }

    .detail-card,
    .response-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

@media (max-width: 980px) {
    .hero,
    .grid-2,
    .grid-3,
    .steps,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero__card {
        min-height: 420px;
    }

    .hero__summary {
        padding: 24px;
    }

    .option-grid,
    .option-grid.small {
        grid-template-columns: repeat(2, 1fr);
    }

    .panel__header,
    .topbar,
    .response-card,
    .submit-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .response-card__side {
        justify-items: start;
    }

    .submit-bar {
        position: static;
        border-radius: var(--radius);
    }
}

@media (max-width: 620px) {
    .page {
        width: min(100% - 22px, 1180px);
        padding-top: 18px;
    }

    .hero {
        min-height: auto;
    }

    .hero__content h1,
    .topbar h1 {
        letter-spacing: -0.045em;
    }

    .hero__card {
        min-height: 420px;
    }

    .hero__summary {
        border-radius: 24px;
    }

    .floating-card {
        position: relative;
        inset: auto !important;
        width: auto;
        margin: 14px;
    }

    .option-grid,
    .option-grid.small,
    .radio-row {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 16px;
    }

    .info-row {
        display: grid;
    }

    .info-row strong {
        text-align: left;
    }
}
