.brr-form-shell,
.brr-form-shell * {
    box-sizing: border-box;
}

.brr-form-shell {
    --brr-yellow: #f8b818;
    --brr-yellow-deep: #e3a000;
    --brr-black: #141414;
    --brr-grey: #6f6f6f;
    --brr-line: #e8e8e8;
    --brr-soft: #f7f7f5;
    width: 100%;
    max-width: 100%;
    color: var(--brr-black);
    font-family: Inter, Helvetica, Arial, sans-serif;
}

.brr-form-panel {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.08);
    padding: clamp(24px, 4vw, 50px);
}

.brr-topline {
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--brr-yellow);
}

.brr-form-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.brr-brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
}

.brr-brand-mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 52px;
    padding: 0 8px;
    border: 4px solid var(--brr-yellow);
    border-radius: 4px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.08em;
}

.brr-brand-copy {
    font-size: 15px;
    font-weight: 800;
    line-height: .95;
    letter-spacing: .02em;
}

.brr-step-pill {
    flex: 0 0 auto;
    padding: 10px 15px;
    border: 1px solid #dedede;
    border-radius: 999px;
    color: #353535;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.brr-title-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.brr-kicker,
.brr-section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4b4b4b;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.brr-kicker {
    border: 1px solid #d8d8d8;
    border-radius: 5px;
    padding: 9px 12px;
    margin-bottom: 18px;
}

.brr-kicker-star {
    color: var(--brr-yellow-deep);
    font-size: 14px;
}

.brr-main-title {
    max-width: 900px;
    margin: 0;
    color: #111;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.02;
    font-weight: 500;
    letter-spacing: -0.045em;
}

.brr-main-title::after {
    content: '';
    display: inline-block;
    width: .16em;
    height: .16em;
    margin-left: .08em;
    border-radius: 50%;
    background: var(--brr-yellow);
    vertical-align: .1em;
}

.brr-main-subtitle {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--brr-grey);
    font-size: 16px;
    line-height: 1.7;
}

.brr-progress-track {
    width: 100%;
    height: 4px;
    margin-bottom: clamp(28px, 4vw, 42px);
    overflow: hidden;
    border-radius: 999px;
    background: #ededed;
}

.brr-progress-fill {
    display: block;
    width: 16.6667%;
    height: 100%;
    border-radius: inherit;
    background: var(--brr-yellow);
    transition: width .25s ease;
}

.brr-step {
    display: none;
    width: 100%;
    animation: brrFade .25s ease both;
}

.brr-step.is-active {
    display: block;
}

@keyframes brrFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.brr-step-header {
    max-width: 820px;
    margin-bottom: 24px;
}

.brr-step-header .brr-section-label,
.brr-success-card .brr-section-label {
    color: #9a7100;
    margin-bottom: 9px;
}

.brr-step-header h3,
.brr-success-card h3 {
    margin: 0 0 8px;
    color: #111;
    font-size: clamp(26px, 3.2vw, 40px);
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -.035em;
}

.brr-step-header p,
.brr-success-card p {
    margin: 0;
    color: #757575;
    font-size: 15px;
    line-height: 1.65;
}

.brr-persona-grid,
.brr-card-grid,
.brr-field-grid {
    display: grid;
    width: 100%;
    gap: 14px;
}

.brr-persona-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

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

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

.brr-persona-card,
.brr-option-card {
    position: relative;
    min-width: 0;
    width: 100%;
    border: 1px solid #dedede;
    border-radius: 6px;
    background: #fff;
    color: #151515 !important;
    text-align: left;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.brr-persona-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    min-height: 154px;
    padding: 24px;
    overflow: hidden;
    appearance: none;
    cursor: pointer;
    font-family: inherit;
}

.brr-persona-card-wide {
    grid-column: 1 / -1;
}

.brr-card-number {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 5px;
    background: var(--brr-yellow);
    color: #111 !important;
    font-size: 12px;
    font-weight: 800;
}

.brr-persona-card strong {
    display: block;
    margin: 1px 0 8px;
    color: #121212 !important;
    min-width: 0;
    max-width: 100%;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 700;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
}

.brr-persona-card small {
    display: block;
    color: #737373 !important;
    min-width: 0;
    max-width: 100%;
    font-size: 15px;
    line-height: 1.55;
    font-weight: 450;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
}

.brr-persona-card:hover,
.brr-persona-card.is-selected,
.brr-option-card:hover,
.brr-option-card.is-selected {
    transform: translateY(-2px);
    border-color: var(--brr-yellow-deep);
    background: #fffdfa;
    box-shadow: 0 14px 32px rgba(0, 0, 0, .08);
}

.brr-persona-card.is-selected::after,
.brr-option-card.is-selected::after {
    content: '✓';
    position: absolute;
    top: 13px;
    right: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.brr-option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 16px 18px;
    cursor: pointer;
}

.brr-option-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.brr-choice-dot {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border: 1px solid #cfcfcf;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 4px #fff;
}

.brr-option-card.is-selected .brr-choice-dot {
    border-color: var(--brr-yellow-deep);
    background: var(--brr-yellow);
}

.brr-option-card > span:last-child {
    padding-right: 26px;
    color: #242424 !important;
    min-width: 0;
    max-width: 100%;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 650;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

.brr-field {
    min-width: 0;
}

.brr-field-wide {
    grid-column: 1 / -1;
}

.brr-field label {
    display: block;
    margin: 0 0 8px;
    color: #252525;
    font-size: 14px;
    font-weight: 700;
}

.brr-field label em {
    margin-left: 3px;
    color: var(--brr-yellow-deep);
    font-style: normal;
}

.brr-field input,
.brr-field select,
.brr-field textarea {
    display: block;
    width: 100%;
    min-height: 52px;
    margin: 0;
    border: 1px solid #d9d9d9 !important;
    border-radius: 5px !important;
    outline: none;
    background: #fff !important;
    color: #151515 !important;
    box-shadow: none !important;
    padding: 13px 14px !important;
    font: inherit !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.brr-field textarea {
    min-height: 128px;
    resize: vertical;
}

.brr-field input:focus,
.brr-field select:focus,
.brr-field textarea:focus {
    border-color: var(--brr-yellow-deep) !important;
    box-shadow: 0 0 0 3px rgba(248,184,24,.16) !important;
}

.brr-field input.is-invalid,
.brr-field select.is-invalid,
.brr-field textarea.is-invalid,
.brr-card-grid.is-invalid {
    border-color: #c62828 !important;
}

.brr-card-grid.is-invalid {
    border: 1px solid #c62828;
    border-radius: 7px;
    padding: 8px;
}

.brr-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #ededed;
}

.brr-btn {
    appearance: none;
    min-height: 54px;
    border-radius: 6px !important;
    padding: 6px 7px 6px 20px !important;
    font-family: inherit !important;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.brr-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--brr-yellow) !important;
    background: #fff !important;
    color: #b17b00 !important;
}

.brr-btn-primary > span {
    position: relative;
    z-index: 2;
}

.brr-btn-primary .brr-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 6px;
    background: var(--brr-yellow);
    color: #111 !important;
    font-size: 22px;
    font-weight: 500;
}

.brr-btn-primary:hover {
    transform: translateY(-1px);
}

/* Submit button pseudo-element sweep hover */
.brr-btn-primary[data-submit] {
    position: relative;
    background: #fff !important;
    color: #b17b00 !important;
}

.brr-btn-primary[data-submit]::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--brr-yellow);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .42s cubic-bezier(.22, 1, .36, 1);
}

.brr-btn-primary[data-submit]:hover::before,
.brr-btn-primary[data-submit]:focus-visible::before {
    transform: scaleX(1);
}

.brr-btn-primary[data-submit]:hover,
.brr-btn-primary[data-submit]:focus-visible {
    color: #111 !important;
    border-color: var(--brr-yellow) !important;
}

.brr-btn-primary[data-submit] .brr-arrow {
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

.brr-btn-primary[data-submit]:hover .brr-arrow,
.brr-btn-primary[data-submit]:focus-visible .brr-arrow {
    background: #111;
    color: var(--brr-yellow) !important;
    transform: translateX(2px);
}

.brr-btn-secondary {
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8d8d8 !important;
    background: #fff !important;
    color: #1c1c1c !important;
    padding: 0 20px !important;
}

.brr-btn-secondary:hover {
    border-color: #bcbcbc !important;
    background: #f7f7f7 !important;
}

.brr-btn:disabled {
    opacity: .65;
    cursor: wait;
}

.brr-form-error {
    display: none;
    margin-top: 18px;
    border-left: 3px solid #c62828;
    background: #fff4f4;
    color: #8b1a1a;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
}

.brr-success-card {
    position: relative;
    overflow: hidden;
    min-height: 330px;
    padding: clamp(28px, 5vw, 58px);
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff 0%, #fffdf7 100%);
}

.brr-success-card::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -80px;
    width: 250px;
    height: 250px;
    border: 45px solid rgba(248,184,24,.23);
    border-radius: 24px;
    transform: rotate(15deg);
}

.brr-success-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 24px;
    border-radius: 8px;
    background: var(--brr-yellow);
    color: #111;
    font-size: 28px;
    font-weight: 800;
}

.brr-success-card h3,
.brr-success-card p,
.brr-success-card .brr-section-label,
.brr-success-mark {
    position: relative;
    z-index: 1;
}

@media (max-width: 820px) {
    .brr-form-panel { padding: 26px 20px; }
    .brr-main-title { font-size: clamp(34px, 9vw, 50px); }
    .brr-persona-grid,
    .brr-card-grid,
    .brr-field-grid { grid-template-columns: 1fr; }
    .brr-persona-card-wide,
    .brr-field-wide { grid-column: auto; }
}

@media (max-width: 520px) {
    .brr-form-panel { border-radius: 0; padding: 24px 16px; }
    .brr-form-topbar { align-items: flex-start; }
    .brr-brand-mark { min-width: 53px; height: 47px; font-size: 24px; }
    .brr-brand-copy { font-size: 13px; }
    .brr-step-pill { padding: 8px 10px; font-size: 11px; }
    .brr-persona-card { grid-template-columns: 38px minmax(0, 1fr); min-height: 0; padding: 19px 16px; }
    .brr-persona-card strong { font-size: 18px; }
    .brr-persona-card small { font-size: 14px; }
    .brr-card-number { width: 36px; height: 36px; }
    .brr-actions { justify-content: stretch; }
    .brr-btn { flex: 1 1 auto; justify-content: space-between; }
    .brr-btn-secondary { justify-content: center; }
}

/* ===== v1.1 compact single-view layout ===== */
.brr-form-shell {
    min-height: 0;
}

.brr-form-panel {
    max-width: 100%;
    min-height: 0;
    padding: clamp(18px, 2.2vw, 28px);
}

.brr-form-topbar-compact {
    justify-content: flex-end;
    margin-bottom: 10px;
}

.brr-progress-track {
    margin-bottom: clamp(14px, 2vw, 20px);
}

.brr-step-header {
    margin-bottom: 14px;
}

.brr-step-header h3,
.brr-success-card h3,
.brr-review-card h3 {
    font-size: clamp(24px, 2.4vw, 34px);
}

.brr-step-header p,
.brr-success-card p,
.brr-review-card p {
    font-size: 14px;
    line-height: 1.45;
}

.brr-persona-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.brr-persona-card-wide {
    grid-column: auto;
}

.brr-persona-card {
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 10px;
    min-height: 112px;
    padding: 14px;
}

.brr-card-number {
    width: 36px;
    height: 36px;
}

.brr-persona-card strong {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.18;
}

.brr-persona-card small {
    font-size: 12px;
    line-height: 1.35;
}

.brr-card-grid,
.brr-field-grid {
    gap: 10px;
}

.brr-option-card {
    min-height: 58px;
    padding: 12px 14px;
}

.brr-field label {
    margin-bottom: 5px;
    font-size: 13px;
}

.brr-field input,
.brr-field select,
.brr-field textarea {
    min-height: 46px;
    padding: 10px 12px !important;
    font-size: 14px !important;
}

.brr-field textarea {
    min-height: 88px;
    resize: none;
}

.brr-actions {
    margin-top: 16px;
    padding-top: 14px;
}

.brr-btn {
    min-height: 48px;
}

.brr-review-card {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(24px, 4vw, 44px);
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    background: #fffdf7;
}

.brr-review-card .brr-section-label {
    color: #9a7100;
    margin-bottom: 9px;
}

.brr-review-card h3 {
    margin: 0 0 8px;
    color: #111;
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -.035em;
}

.brr-review-card p {
    margin: 0;
    color: #757575;
    max-width: 680px;
}

@media (min-width: 821px) {
    .brr-form-shell {
        height: min(760px, calc(100dvh - 24px));
        display: flex;
        align-items: center;
    }

    .brr-form-panel {
        max-height: 100%;
    }
}

@media (max-width: 820px) {
    .brr-form-panel { padding: 18px; }
    .brr-persona-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .brr-persona-card-wide { grid-column: auto; }
}

@media (max-width: 520px) {
    .brr-form-panel { padding: 14px 12px; }
    .brr-form-topbar-compact { margin-bottom: 8px; }
    .brr-progress-track { margin-bottom: 12px; }
    .brr-step-header { margin-bottom: 10px; }
    .brr-step-header h3,
    .brr-success-card h3,
    .brr-review-card h3 { font-size: 22px; }
    .brr-step-header p { font-size: 12px; line-height: 1.35; }
    .brr-persona-grid { grid-template-columns: 1fr; gap: 7px; }
    .brr-persona-card { min-height: 72px; padding: 10px; grid-template-columns: 32px minmax(0, 1fr); }
    .brr-card-number { width: 30px; height: 30px; }
    .brr-persona-card strong { font-size: 14px; }
    .brr-persona-card small { font-size: 11px; line-height: 1.25; }
    .brr-option-card { min-height: 50px; padding: 9px 11px; }
    .brr-field-grid { gap: 8px; }
    .brr-actions { margin-top: 10px; padding-top: 10px; }
    .brr-btn { min-height: 44px; }
}
