:root {
    --ob-success: #059669;
    --ob-primary: #5b4b8a;
    --ob-primary-dark: #3d3161;
    --ob-primary-light: #7c6bae;
    --ob-accent: #e8788a;
    --ob-bg: #faf9fc;
    --ob-border: #e8e3f0;
    --ob-text: #1f2937;
    --ob-muted: #6b7280;
    --ob-aside-w: 380px;
    --ob-ui-scale: 1;
}

* { box-sizing: border-box; }

.ob-body {
    margin: 0;
    font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
    background: var(--ob-bg);
    color: var(--ob-text);
    min-height: 100vh;
    position: relative;
}

.ob-bg-pattern {
    display: none;
    pointer-events: none;
}

.ob-shell {
    display: flex;
    min-height: 100vh;
}

/* Left panel */
.ob-aside {
    width: var(--ob-aside-w);
    min-width: var(--ob-aside-w);
    background: var(--ob-primary-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.75rem 1.25rem;
}

.ob-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    position: relative;
    z-index: 1;
}

.ob-brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.35);
}

.ob-aside-content {
    flex: 1;
    padding: 1.25rem 0 1rem;
    position: relative;
    z-index: 1;
}

.ob-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
    margin-bottom: 0.75rem;
}

.ob-aside-title {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.75rem;
}

.ob-aside-lead {
    font-size: 0.875rem;
    line-height: 1.55;
    opacity: 0.88;
    margin-bottom: 1.25rem;
}

.ob-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ob-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    padding: 0.3rem 0;
    opacity: 0.92;
}

.ob-benefits i {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.55);
}

/* Stepper — vertical, intentional on sidebar */
.ob-stepper {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.ob-stepper-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0.5rem 0;
}

.ob-stepper-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    background: transparent;
    color: rgba(255,255,255,0.6);
}

.ob-stepper-item.current .ob-stepper-marker {
    border-color: #fff;
    background: #fff;
    color: var(--ob-primary);
}

.ob-stepper-item.complete .ob-stepper-marker {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.ob-stepper-label {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

.ob-stepper-desc {
    font-size: 0.75rem;
    opacity: 0.65;
    margin-top: 2px;
}

.ob-stepper-item.current .ob-stepper-label { opacity: 1; }
.ob-stepper-item.upcoming .ob-stepper-label { opacity: 0.55; }

.ob-aside-foot {
    position: relative;
    z-index: 1;
    padding-top: 1rem;
    font-size: 0.85rem;
}

.ob-aside-foot a {
    color: rgba(255,255,255,0.85);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Right panel — form */
.ob-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.25rem 2rem 2rem;
    overflow-y: auto;
    background: var(--ob-bg);
}

.ob-form-panel {
    width: 100%;
    max-width: 480px;
}

.ob-form-header {
    margin-bottom: 1.15rem;
}

.ob-form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ob-primary-dark);
    margin: 0 0 0.35rem;
}

.ob-form-header p {
    color: var(--ob-muted);
    margin: 0;
    font-size: 0.9rem;
}

.ob-form-card {
    background: #fff;
    border: 1px solid var(--ob-border);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ob-field {
    margin-bottom: 1rem;
}

.ob-field label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.4rem;
    color: var(--ob-text);
}

.ob-field .form-control,
.ob-field .form-select {
    border-radius: 10px;
    border: 1.5px solid var(--ob-border);
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ob-field .form-control:focus,
.ob-field .form-select:focus {
    border-color: var(--ob-primary);
    box-shadow: 0 0 0 3px rgba(91, 75, 138, 0.08);
}

.ob-field .form-text {
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

.ob-password-wrap {
    position: relative;
}

.ob-password-wrap .form-control {
    padding-right: 2.75rem;
}

.ob-password-toggle {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
}

.ob-password-toggle:hover {
    color: var(--ob-primary);
}

.ob-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 0.7rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: var(--ob-primary-dark);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 0.35rem;
}

.ob-btn-primary:hover {
    background: var(--ob-primary);
    color: #fff;
}

.ob-btn-primary:disabled {
    opacity: 0.65;
    transform: none;
    cursor: not-allowed;
}

/* Choice cards (session type, mode) */
.ob-choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ob-choice-grid--2 { grid-template-columns: 1fr 1fr; }

.ob-choice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.9rem 0.75rem;
    border: 1px solid var(--ob-border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: #fff;
}

.ob-choice-card input { position: absolute; opacity: 0; pointer-events: none; }

.ob-choice-card i {
    font-size: 1.65rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.ob-choice-card strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.ob-choice-card span {
    font-size: 0.75rem;
    color: var(--ob-muted);
    line-height: 1.35;
}

.ob-choice-card:has(input:checked),
.ob-choice-card.is-selected {
    border-color: var(--ob-primary);
    background: #fafafa;
}

.ob-choice-card:has(input:checked) i,
.ob-choice-card.is-selected i {
    color: var(--ob-primary);
}

.ob-choice-card:hover { border-color: #d1d5db; }

/* Concern multi-select cards (plain-language support options) */
.ob-concern-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ob-concern-card {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--ob-border);
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    font-size: 0.82rem;
    line-height: 1.35;
    transition: border-color 0.15s, background 0.15s;
}

.ob-concern-card input { margin-top: 0.15rem; }

.ob-concern-card:has(input:checked) {
    border-color: var(--ob-primary);
    background: #fafafa;
}

.ob-concern-card:hover { border-color: #d1d5db; }

@media (max-width: 576px) {
    .ob-concern-grid { grid-template-columns: 1fr; }
}

.ob-btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--ob-primary);
    background: #fff;
    border: 1.5px solid var(--ob-border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.ob-btn-outline:hover {
    border-color: var(--ob-primary-light);
    background: #faf9fc;
}

.ob-location-panel {
    background: #f9fafb;
    border: 1px solid var(--ob-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.ob-location-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--ob-success, #059669);
    font-weight: 600;
    padding: 0.5rem 0;
}

.ob-location-status i { font-size: 1.25rem; }

/* Mobile gamification header */
.ob-mobile-header {
    display: none;
}

/* Desktop: compact ~90% feel */
@media (min-width: 992px) {
    .ob-body {
        font-size: 90%;
    }

    .ob-brand-logo {
        width: 38px;
        height: 38px;
    }

    .ob-brand {
        font-size: 1.05rem;
    }

    .ob-stepper-marker {
        width: 28px;
        height: 28px;
        font-size: 0.72rem;
    }

    .ob-stepper-label {
        font-size: 0.8125rem;
    }

    .ob-stepper-desc {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .ob-choice-grid { grid-template-columns: 1fr; }
}

@media (max-width: 991px) {
    .ob-bg-pattern {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 0;
        opacity: 0.5;
        background-image:
            radial-gradient(circle at 15% 25%, rgba(91, 75, 138, 0.07) 0 2px, transparent 2px),
            radial-gradient(circle at 85% 75%, rgba(232, 120, 138, 0.05) 0 2px, transparent 2px);
        background-size: 24px 24px, 32px 32px;
        pointer-events: none;
    }

    .ob-shell {
        flex-direction: column;
        position: relative;
        z-index: 1;
        min-height: 100vh;
    }

    /* Hide desktop sidebar entirely on mobile — fixes double-header overlap */
    .ob-aside { display: none !important; }

    .ob-mobile-header {
        display: block;
        background: #fff;
        color: var(--ob-text);
        padding: 0;
        position: sticky;
        top: 0;
        z-index: 1020;
        border-bottom: 1px solid var(--ob-border);
        box-shadow: 0 1px 8px rgba(91, 75, 138, 0.06);
    }

    .ob-mobile-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.65rem 1rem 0.55rem;
    }

    .ob-mobile-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--ob-primary-dark);
        text-decoration: none;
        font-weight: 700;
        font-size: 0.875rem;
        min-width: 0;
    }

    .ob-mobile-brand span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ob-mobile-brand img {
        border-radius: 50%;
        border: 1px solid var(--ob-border);
        object-fit: cover;
        flex-shrink: 0;
    }

    .ob-mobile-step-count {
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--ob-primary);
        background: #f3f0fa;
        padding: 0.3rem 0.6rem;
        border-radius: 999px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .ob-mobile-track {
        height: 3px;
        background: #eef0f3;
    }

    .ob-mobile-track-fill {
        height: 100%;
        background: linear-gradient(90deg, var(--ob-primary), var(--ob-primary-light));
        border-radius: 0 2px 2px 0;
        transition: width 0.35s ease;
    }

    .ob-mobile-progress-block {
        padding: 0.75rem 1rem 0.85rem;
        background: #fafafa;
        border-top: 1px solid #f0f0f2;
    }

    .ob-mobile-steps {
        display: flex;
        justify-content: space-between;
        gap: 6px;
        margin-bottom: 0.55rem;
        position: relative;
    }

    .ob-mobile-steps::before {
        content: '';
        position: absolute;
        left: 14px;
        right: 14px;
        top: 50%;
        height: 2px;
        background: #e5e7eb;
        transform: translateY(-50%);
        z-index: 0;
    }

    .ob-mobile-step-dot {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.68rem;
        font-weight: 700;
        background: #fff;
        border: 2px solid #e5e7eb;
        color: #9ca3af;
        flex-shrink: 0;
        position: relative;
        z-index: 1;
    }

    .ob-mobile-step-dot.done {
        background: var(--ob-primary);
        border-color: var(--ob-primary);
        color: #fff;
    }

    .ob-mobile-step-dot.current {
        background: #fff;
        border-color: var(--ob-primary);
        color: var(--ob-primary);
        box-shadow: 0 0 0 3px rgba(91, 75, 138, 0.12);
    }

    .ob-mobile-step-label {
        font-size: 0.8125rem;
        font-weight: 600;
        color: var(--ob-primary-dark);
        margin: 0;
        line-height: 1.35;
    }

    .ob-main {
        flex: 1;
        padding: 1rem 1rem 0;
        align-items: flex-start;
        width: 100%;
    }

    .ob-form-header {
        margin-bottom: 0.85rem;
    }

    .ob-form-header h2 {
        font-size: 1.3rem;
        line-height: 1.2;
    }

    .ob-form-header p {
        font-size: 0.875rem;
    }

    .ob-form-card {
        padding: 1.35rem;
        border-radius: 14px;
        box-shadow: none;
    }
}

/* ---- Therapist application journey (apply/form.php, apply/thank-you.php) ---- */
.ob-apply-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ob-primary);
    margin: 1.5rem 0 0.9rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--ob-border);
}

.ob-apply-section-title:first-child {
    margin-top: 0;
}

.ob-apply-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    color: #fff;
    background: linear-gradient(135deg, var(--ob-success), #10b981);
    box-shadow: 0 10px 26px rgba(5, 150, 105, 0.28);
}

.ob-apply-success-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ob-primary-dark);
    margin: 0 0 0.6rem;
    line-height: 1.25;
}

.ob-apply-success-lead {
    color: var(--ob-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 26rem;
}

.ob-apply-reference {
    display: inline-block;
    margin-top: 0.9rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(91, 75, 138, 0.08);
    color: var(--ob-primary-dark);
    font-size: 0.82rem;
}

.ob-apply-next-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: obnext;
}

.ob-apply-next-steps li {
    position: relative;
    padding: 0 0 1rem 2.5rem;
    border-bottom: 1px dashed var(--ob-border);
}

.ob-apply-next-steps li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ob-apply-next-steps li::before {
    counter-increment: obnext;
    content: counter(obnext);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(91, 75, 138, 0.1);
    color: var(--ob-primary);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ob-apply-next-steps strong {
    display: block;
    font-size: 0.9rem;
    color: var(--ob-text);
    margin-bottom: 0.15rem;
}

.ob-apply-next-steps span {
    font-size: 0.82rem;
    color: var(--ob-muted);
    line-height: 1.55;
}

.ob-field--compact-consent .form-check {
    margin-bottom: 0.35rem;
}

.ob-field--compact-consent .form-check-label {
    font-size: 0.88rem;
}

.ob-story-wrap {
    position: relative;
}

.ob-story-input {
    min-height: 9rem;
    padding-right: 3.25rem;
    resize: vertical;
    border-radius: 14px;
    border-color: var(--ob-border);
    font-size: 1rem;
    line-height: 1.55;
}

.ob-mic-btn {
    position: absolute;
    right: 0.65rem;
    bottom: 0.65rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 999px;
    background: var(--ob-primary-soft, rgba(91, 75, 138, 0.12));
    color: var(--ob-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.ob-mic-btn.is-listening {
    background: var(--ob-accent);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(232, 120, 138, 0.35);
}

.ob-play-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.ob-play-back {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--ob-primary);
    font-weight: 700;
    font-size: 0.88rem;
}

.ob-play-meta span {
    margin-left: auto;
    color: var(--ob-primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ob-play-track {
    height: 6px;
    margin-bottom: 1.1rem;
    border-radius: 999px;
    background: rgba(91, 75, 138, 0.12);
    overflow: hidden;
}

.ob-play-track div {
    height: 100%;
    width: 20%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ob-primary) 0%, #7d6aad 100%);
    transition: width 0.25s ease;
}

.ob-play-step[hidden] {
    display: none;
}

.ob-topic-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ob-topic {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--ob-border);
    border-radius: 999px;
    padding: 0.5rem 0.8rem;
    background: #fff;
    color: #3d3161;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.ob-topic i {
    display: none;
    font-size: 1rem;
}

.ob-topic.is-fit:not(.is-on) {
    border-style: dashed;
    border-color: var(--ob-primary);
}

.ob-topic.is-on {
    border-color: var(--ob-primary);
    background: var(--ob-primary);
    color: #fff;
}

.ob-topic.is-on i {
    display: inline-flex;
}

.ob-topic-score {
    margin: 0.75rem 0 0;
    color: var(--ob-muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.ob-field-error {
    margin: 0.45rem 0 0;
    color: #b42318;
    font-size: 0.86rem;
    font-weight: 650;
}

.ob-topic-grid.is-invalid {
    padding: 0.65rem;
    border-radius: 16px;
    background: #fff6f7;
    box-shadow: inset 0 0 0 2px #e8788a;
}

.ob-story-input.is-invalid,
.ob-field .form-control.is-invalid {
    border-color: #e8788a;
    box-shadow: 0 0 0 3px rgba(232, 120, 138, 0.16);
}

.ob-concern-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.ob-concern-chip {
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    background: rgba(91, 75, 138, 0.1);
    color: var(--ob-primary-dark);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.ob-concern-chip:hover {
    background: rgba(91, 75, 138, 0.16);
}

.ob-scope-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ob-scope-pill {
    margin: 0;
    cursor: pointer;
}

.ob-scope-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ob-scope-pill span {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--ob-border);
    font-size: 0.88rem;
    background: #fff;
}

.ob-scope-pill input:checked + span {
    border-color: var(--ob-primary);
    background: rgba(91, 75, 138, 0.08);
    color: var(--ob-primary-dark);
    font-weight: 600;
}

.ob-more-details {
    margin: 1rem 0 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--ob-border);
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.6);
}

.ob-more-details summary {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ob-muted);
    list-style: none;
}

.ob-more-details summary::-webkit-details-marker {
    display: none;
}

.ob-more-body {
    padding-top: 0.85rem;
}

/* Recap of an accepted application, shown instead of asking for it again */
.ob-recap {
    margin: 0 0 1.5rem;
    border: 1px solid var(--ob-border);
    border-radius: 16px;
    background: rgba(91, 75, 138, 0.04);
    overflow: hidden;
}

.ob-recap-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--ob-border);
    background: #fff;
}

.ob-recap-photo {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(61, 49, 97, 0.18);
}

.ob-recap-photo--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 75, 138, 0.1);
    color: var(--ob-primary);
    font-size: 1.6rem;
}

.ob-recap-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ob-primary-dark);
}

.ob-recap-sub {
    margin: 0.1rem 0 0;
    font-size: 0.82rem;
    color: var(--ob-muted);
}

.ob-recap-list {
    margin: 0;
    padding: 0.35rem 1.1rem 0.6rem;
}

.ob-recap-row {
    display: flex;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(232, 227, 240, 0.8);
}

.ob-recap-row:last-child {
    border-bottom: 0;
}

.ob-recap-row dt {
    flex: 0 0 38%;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ob-muted);
}

.ob-recap-row dd {
    flex: 1 1 auto;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ob-text);
    overflow-wrap: anywhere;
}

.ob-recap-foot {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0;
    padding: 0.7rem 1.1rem 0.85rem;
    border-top: 1px solid var(--ob-border);
    font-size: 0.8rem;
    color: var(--ob-muted);
}

.ob-recap-foot i {
    font-size: 1rem;
    color: var(--ob-primary);
}

@media (max-width: 575.98px) {
    .ob-recap-row {
        flex-direction: column;
        gap: 0.15rem;
    }

    .ob-recap-row dt {
        flex-basis: auto;
    }
}

/* Legal document modals (terms.php, consent.php) — A4-style overlay */
body.terms-modal-open {
    overflow: hidden;
}

.terms-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(61, 49, 97, 0.55);
    backdrop-filter: blur(2px);
}

.terms-modal {
    position: fixed;
    inset: 0;
    z-index: 1051;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.terms-modal[hidden],
.terms-modal-backdrop[hidden] {
    display: none;
}

.terms-modal-card {
    display: flex;
    flex-direction: column;
    width: min(820px, 100%);
    max-height: min(86vh, 940px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(61, 49, 97, 0.28);
    overflow: hidden;
}

.terms-modal-card--a4 {
    width: min(210mm, calc(100vw - 2rem));
    max-height: min(297mm, calc(100vh - 2rem));
}

.terms-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.35rem;
    background: linear-gradient(135deg, var(--ob-primary-dark) 0%, var(--ob-primary) 100%);
    color: #fff;
}

.terms-modal-head h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.terms-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
}

.terms-modal-close:hover {
    background: rgba(255, 255, 255, 0.32);
}

.terms-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.35rem 1.5rem;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--ob-text);
    outline: none;
    -webkit-overflow-scrolling: touch;
}

.terms-modal-body h3 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ob-primary-dark);
    margin: 1.25rem 0 0.35rem;
}

.terms-modal-body p {
    margin: 0 0 0.75rem;
}

.terms-modal-meta {
    font-size: 0.8rem;
    color: var(--ob-muted);
    border: 1px solid var(--ob-border);
    background: rgba(91, 75, 138, 0.05);
    border-radius: 12px;
    padding: 0.6rem 0.9rem;
}

.terms-modal-warning {
    font-size: 0.8rem;
    font-weight: 700;
    color: #a13b52;
    background: rgba(232, 120, 138, 0.12);
    border-left: 3px solid var(--ob-accent);
    border-radius: 0 10px 10px 0;
    padding: 0.65rem 0.85rem;
}

.terms-modal-foot {
    display: flex;
    justify-content: center;
    padding: 0.85rem 1.35rem;
    border-top: 1px solid var(--ob-border);
    background: #fff;
}

.terms-modal-agree {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 999px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--ob-primary) 0%, var(--ob-primary-light) 100%);
}

.ob-field--compact-consent a[data-terms-modal],
.ob-field--compact-consent a[data-consent-modal] {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
