/* ==========================================================
   WIZARD MODAL + CHATBOT + RESPONSIVE
   ========================================================== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--c-overlay);
    backdrop-filter: blur(6px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--t-base)
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible
}

.modal {
    background: #f6f9fd;
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    width: 95%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px) scale(.98);
    transition: transform var(--t-slow);
    box-shadow: var(--shadow-lg)
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1)
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.35rem 2rem;
    border-bottom: 1px solid var(--c-border)
}

.modal-header h3 {
    font-size: 1.45rem;
    font-weight: 900;
    min-width: 0;
    flex: 1 1 auto
}

.modal-close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(8, 22, 43, .1);
    background: rgba(20, 119, 248, .07);
    border-radius: 50%;
    color: var(--c-text-heading);
    cursor: pointer;
    position: relative;
    box-shadow: 0 8px 20px rgba(8, 22, 43, .08);
    transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base), background var(--t-base)
}

.modal-close::before,
.modal-close::after,
.chat-close::before,
.chat-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor
}

.modal-close::before,
.chat-close::before {
    transform: rotate(45deg)
}

.modal-close::after,
.chat-close::after {
    transform: rotate(-45deg)
}

.modal-close:hover {
    transform: translateY(-1px);
    background: #f8fbff;
    border-color: rgba(20, 119, 248, .28);
    box-shadow: 0 12px 28px rgba(8, 22, 43, .12)
}

/* Progress */
.wizard-progress {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    gap: .65rem
}

.progress-step {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, .06);
    border-radius: var(--r-full);
    transition: background var(--t-base)
}

.progress-step.active {
    background: var(--g-primary)
}

.progress-step.done {
    background: var(--c-success)
}

/* Wizard Body */
.wizard-body {
    padding: 1.6rem 2rem 1rem;
    min-height: 320px
}

.wizard-step {
    display: none;
    animation: fadeInUp .3s ease
}

.wizard-step.active {
    display: block
}

.wizard-step h4 {
    font-size: 1.35rem;
    margin-bottom: .25rem
}

.wizard-step .step-desc {
    font-size: .92rem;
    color: var(--c-text-muted);
    margin-bottom: 0
}

.wizard-step-intro {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1.35rem
}

.wizard-step-intro>div:last-child>span {
    display: inline-flex;
    color: var(--c-primary);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: .3rem
}

.wizard-step-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #0b6ef5, #36a3ff);
    box-shadow: 0 14px 30px rgba(20, 119, 248, .28)
}

.wizard-step-icon svg {
    width: 32px;
    height: 32px
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem
}

.form-group label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: .5rem
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: .75rem 1rem;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    color: var(--c-text);
    font-family: var(--f-body);
    font-size: 1rem;
    transition: all var(--t-base);
    outline: none
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, .1)
}

.service-option:focus-visible,
.choice-pill:focus-visible,
.effort-card:focus-visible,
.time-slot:focus-visible,
.factor-option:focus-within,
.modal-close:focus-visible,
.chat-close:focus-visible,
.chat-bubble:focus-visible,
.chat-send:focus-visible {
    outline: 3px solid var(--c-primary-light);
    outline-offset: 2px
}

.form-textarea {
    min-height: 86px;
    resize: vertical
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%238892a4'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 2.5rem;
    cursor: pointer
}

.form-select option {
    background: var(--c-bg-section);
    color: var(--c-text)
}

.form-error {
    font-size: .75rem;
    color: var(--c-danger);
    margin-top: .25rem;
    display: none
}

.form-hint {
    margin-top: .45rem;
    color: var(--c-text-muted);
    font-size: .78rem;
    line-height: 1.45
}

.wizard-photo-field>label:first-child {
    margin-bottom: .7rem
}

.photo-upload-dropzone {
    min-height: 150px;
    border: 2px dashed rgba(20, 119, 248, .42);
    border-radius: 18px;
    background: #f2f7ff;
    color: var(--c-text-heading);
    display: grid !important;
    place-items: center;
    align-content: center;
    gap: .42rem;
    padding: 1.6rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--t-base), background var(--t-base), box-shadow var(--t-base), transform var(--t-base)
}

.photo-upload-dropzone:hover,
.photo-upload-dropzone:focus-within {
    border-color: var(--c-primary);
    background: #eef6ff;
    box-shadow: 0 14px 34px rgba(20, 119, 248, .12);
    transform: translateY(-1px)
}

.photo-upload-dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none
}

.photo-upload-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--c-primary)
}

.photo-upload-icon svg {
    width: 34px;
    height: 34px
}

.photo-upload-dropzone strong {
    color: var(--c-text-heading);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.25
}

.photo-upload-dropzone small {
    color: var(--c-text-muted);
    font-size: .86rem;
    font-weight: 600
}

.photo-list {
    display: grid;
    gap: .45rem;
    margin-top: .75rem
}

.photo-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: .65rem;
    padding: .65rem .75rem;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    background: #fff;
    font-size: .84rem
}

.photo-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: var(--c-text-heading)
}

.photo-item small {
    color: var(--c-text-muted)
}

.photo-item button {
    border: 0;
    background: transparent;
    color: var(--c-primary);
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer
}

.form-group.error .form-input,
.form-group.error .form-select,
.form-group.error .form-textarea {
    border-color: var(--c-danger)
}

.form-group.error .form-error {
    display: block
}

/* Service Options */
.service-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .9rem
}

.service-option {
    min-height: 150px;
    padding: 1.05rem;
    background: #fff;
    border: 1.5px solid rgba(8, 22, 43, .12);
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--t-base);
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(8, 22, 43, .05)
}

.service-option::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: var(--g-primary);
    opacity: 0;
    transition: opacity var(--t-base)
}

.service-option:hover {
    border-color: rgba(20, 119, 248, .35);
    background: #fbfdff;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(8, 22, 43, .09)
}

.service-option.selected {
    border-color: var(--c-primary);
    background: linear-gradient(180deg, #ffffff, #eef6ff);
    box-shadow: 0 0 0 3px rgba(20, 119, 248, .12), 0 16px 34px rgba(20, 119, 248, .16)
}

.service-option.selected::after {
    opacity: 1
}

.service-option .option-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-primary);
    background: rgba(20, 119, 248, .1);
    border-radius: 14px;
    margin-bottom: .85rem
}

.service-option .option-icon svg {
    width: 28px;
    height: 28px
}

.service-option h5 {
    font-size: 1rem;
    font-weight: 900;
    color: var(--c-text-heading);
    margin-bottom: .3rem
}

.service-option p {
    font-size: .82rem;
    color: var(--c-text-muted);
    line-height: 1.45;
    margin-top: 2px
}

.option-hint {
    display: inline-flex;
    margin-top: .75rem;
    color: #0b5fcf;
    background: rgba(20, 119, 248, .08);
    border-radius: var(--r-full);
    padding: .28rem .55rem;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.25
}

.wizard-note-field {
    margin-top: 1.2rem
}

.choice-grid,
.effort-grid,
.factor-grid {
    display: grid;
    gap: .65rem
}

.choice-grid {
    grid-template-columns: repeat(3, 1fr)
}

.effort-grid {
    grid-template-columns: repeat(3, 1fr)
}

.choice-pill,
.effort-card {
    border: 1.5px solid rgba(8, 22, 43, .12);
    border-radius: 12px;
    background: #fff;
    color: var(--c-text-heading);
    text-align: left;
    cursor: pointer;
    transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base), transform var(--t-base)
}

.choice-pill {
    min-height: 54px;
    padding: .85rem .95rem
}

.effort-card {
    min-height: 92px;
    display: grid;
    align-content: center;
    gap: .25rem;
    padding: .95rem
}

.choice-pill strong,
.effort-card strong {
    display: block;
    font-size: .86rem;
    font-weight: 900
}

.effort-card span {
    color: var(--c-text-muted);
    font-size: .74rem;
    line-height: 1.35
}

.choice-pill:hover,
.effort-card:hover {
    transform: translateY(-1px);
    border-color: rgba(20, 119, 248, .3);
    background: #fbfdff
}

.choice-pill.selected,
.effort-card.selected {
    border-color: var(--c-primary);
    background: #eef6ff;
    box-shadow: 0 0 0 3px rgba(20, 119, 248, .11)
}

.factor-grid {
    grid-template-columns: repeat(2, 1fr)
}

.factor-option {
    min-height: 52px;
    margin-bottom: 0;
    display: flex !important;
    align-items: center;
    gap: .75rem;
    border: 1px solid rgba(8, 22, 43, .1);
    border-radius: 11px;
    background: #fff;
    padding: .75rem 1rem;
    color: var(--c-text);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--t-base), background var(--t-base), box-shadow var(--t-base)
}

.factor-option:hover {
    border-color: rgba(25, 135, 255, .35);
    background: #fafcff
}

.factor-option:has(input:checked) {
    border-color: var(--c-primary);
    background: #eef6ff;
    box-shadow: 0 0 0 3px rgba(20, 119, 248, .1)
}

.factor-option input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--c-primary);
    flex: 0 0 20px;
    cursor: pointer
}

.factor-option span {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.25;
    display: block
}

/* Time Slots */
.time-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem
}

.time-slot {
    padding: 1rem;
    background: rgba(255, 255, 255, .03);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-md);
    cursor: pointer;
    text-align: center;
    font-size: .875rem;
    font-weight: 500;
    color: var(--c-text);
    transition: all var(--t-base)
}

.time-slot:hover {
    border-color: rgba(245, 166, 35, .3)
}

.time-slot.selected {
    border-color: var(--c-primary);
    background: rgba(245, 166, 35, .08);
    color: var(--c-primary)
}

.time-slot .slot-time {
    font-size: .75rem;
    color: var(--c-text-muted);
    margin-top: 2px
}

/* Urgency Toggle */
.urgency-toggle {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: .9rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, .88), rgba(255, 247, 247, .9));
    border: 1px solid rgba(239, 68, 68, .22);
    border-radius: 14px;
    margin-top: 1rem;
    box-shadow: 0 12px 28px rgba(8, 22, 43, .06)
}

.urgency-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    background: rgba(239, 68, 68, .1);
    border-radius: 14px
}

.urgency-icon svg {
    width: 31px;
    height: 31px
}

.urgency-copy {
    display: grid;
    gap: .18rem;
    min-width: 0
}

.urgency-copy strong {
    color: var(--c-text-heading);
    font-size: .92rem;
    font-weight: 900;
    line-height: 1.25
}

.urgency-copy span {
    color: var(--c-text-muted);
    font-size: .78rem;
    line-height: 1.4
}

.toggle-switch {
    position: relative;
    width: 58px;
    height: 34px;
    flex-shrink: 0;
    cursor: pointer
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #d7dee8;
    border-radius: var(--r-full);
    cursor: pointer;
    border: 1px solid rgba(8, 22, 43, .08);
    transition: background var(--t-base), box-shadow var(--t-base)
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 5px 12px rgba(8, 22, 43, .18);
    transition: transform var(--t-base), box-shadow var(--t-base)
}

.toggle-switch input:checked+.toggle-slider {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .12)
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(24px);
    box-shadow: 0 5px 14px rgba(127, 29, 29, .22)
}

.toggle-switch input:focus-visible+.toggle-slider {
    outline: 3px solid rgba(20, 119, 248, .28);
    outline-offset: 3px
}

/* Price Card */
.price-card {
    background: linear-gradient(135deg, #eef6ff, #fff);
    border: 1px solid rgba(20, 119, 248, .22);
    border-radius: var(--r-lg);
    padding: 1.4rem;
    text-align: left;
    margin-bottom: 1.5rem
}

.price-eyebrow {
    display: inline-flex;
    margin-bottom: .55rem;
    color: var(--c-primary);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase
}

.price-range {
    font-size: clamp(2rem, 5vw, 3.1rem);
    font-weight: 900;
    color: var(--c-primary);
    margin-bottom: .5rem
}

.price-card p {
    color: var(--c-text-muted);
    font-size: .9rem;
    margin-bottom: 1rem
}

.price-bands {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .65rem
}

.price-bands span {
    border: 1px solid rgba(8, 22, 43, .08);
    border-radius: 12px;
    background: #fff;
    padding: .8rem
}

.price-bands strong,
.price-bands b {
    display: block
}

.price-bands strong {
    color: var(--c-text-heading);
    font-size: .76rem;
    margin-bottom: .2rem
}

.price-bands b {
    color: var(--c-primary);
    font-size: .88rem
}

.price-disclaimer {
    font-size: .75rem;
    color: var(--c-text-muted);
    line-height: 1.6
}

/* Summary */
.summary-list {
    margin-bottom: 1.5rem
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--c-border);
    font-size: .875rem
}

.summary-label {
    color: var(--c-text-muted)
}

.summary-value {
    font-weight: 600;
    color: var(--c-text-heading);
    text-align: right;
    max-width: 60%
}

/* Wizard Footer */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid var(--c-border)
}

.step-counter {
    font-size: .75rem;
    color: var(--c-text-muted)
}

.btn-group {
    display: flex;
    gap: .5rem
}

/* Success State */
.wizard-success {
    text-align: center;
    padding: 2.25rem 2rem
}

.wizard-success .success-icon {
    width: 64px;
    height: 64px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 1.15rem;
    border-radius: 18px;
    background: rgba(20, 119, 248, .1);
    color: var(--c-primary)
}

.wizard-success .success-icon svg {
    width: 34px;
    height: 34px
}

.wizard-success h3 {
    font-size: 1.5rem;
    margin-bottom: .5rem
}

.wizard-success p {
    color: var(--c-text-muted);
    font-size: .875rem
}

/* =================== CHATBOT =================== */
.chat-bubble {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: var(--z-chat);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 16px 42px rgba(20, 119, 248, .28), 0 0 0 8px rgba(20, 119, 248, .08);
    transition: transform var(--t-base), box-shadow var(--t-base), opacity var(--t-base);
    border: none;
    color: #fff;
    isolation: isolate
}

.chat-bubble::before {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: inherit;
    background: conic-gradient(from 120deg, rgba(20, 119, 248, .1), rgba(20, 119, 248, .72), rgba(47, 210, 255, .28), rgba(20, 119, 248, .1));
    z-index: -1;
    animation: chatBubbleOrbit 4.2s linear infinite
}

.chat-bubble-avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: block;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .9);
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(8, 22, 43, .08)
}

.chat-bubble-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover
}

.chat-bubble-ping {
    position: absolute;
    right: 7px;
    bottom: 8px;
    width: 15px;
    height: 15px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #18b985;
    box-shadow: 0 0 0 0 rgba(24, 185, 133, .45);
    animation: chatStatusPulse 1.8s ease-out infinite
}

.chat-bubble:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 22px 54px rgba(20, 119, 248, .36), 0 0 0 10px rgba(20, 119, 248, .1)
}

.chat-bubble.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none
}

.modal-overlay.active ~ .chat-bubble,
body:has(.modal-overlay.active) .chat-bubble {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

@keyframes chatBubbleOrbit {
    to {
        transform: rotate(1turn)
    }
}

@keyframes chatStatusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(24, 185, 133, .45)
    }
    70%,
    100% {
        box-shadow: 0 0 0 9px rgba(24, 185, 133, 0)
    }
}

.chat-panel {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: var(--z-chat);
    width: 400px;
    height: 560px;
    background: var(--c-bg-section);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(.95);
    opacity: 0;
    visibility: hidden;
    transition: all var(--t-slow)
}

.chat-panel.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--c-border)
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: .75rem
}

.chat-header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(20, 119, 248, .22);
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(8, 22, 43, .12)
}

.chat-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.chat-header-info h4 {
    font-size: .875rem;
    font-weight: 700
}

.chat-header-info .online-status {
    font-size: .75rem;
    color: var(--c-accent);
    display: flex;
    align-items: center;
    gap: 4px
}

.chat-header-info .online-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--c-accent);
    border-radius: 50%
}

.chat-header-actions {
    display: flex;
    gap: .5rem
}

.chat-header-actions button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(8, 22, 43, .1);
    background: #fff;
    border-radius: 50%;
    color: var(--c-text-heading);
    cursor: pointer;
    position: relative;
    transition: all var(--t-base)
}

.chat-header-actions button:hover {
    background: #f8fbff;
    border-color: rgba(20, 119, 248, .28);
    color: var(--c-primary);
    transform: translateY(-1px)
}

/* Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .75rem
}

.chat-messages::-webkit-scrollbar {
    width: 4px
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .1);
    border-radius: var(--r-full)
}

.chat-disclaimer {
    margin: 0;
    padding: .65rem 1rem;
    border-top: 1px solid var(--c-border);
    color: var(--c-text-muted);
    background: rgba(248, 251, 255, .82);
    font-size: .68rem;
    line-height: 1.4
}

.chat-disclaimer a {
    color: var(--c-primary);
    font-weight: 800;
    text-decoration: none
}

.chat-disclaimer a:hover {
    text-decoration: underline
}

.chat-message {
    max-width: 85%;
    padding: .75rem 1rem;
    border-radius: var(--r-lg);
    font-size: .875rem;
    line-height: 1.6;
    animation: fadeInUp .3s ease;
    overflow-wrap: anywhere;
    word-break: break-word
}

.chat-message.bot {
    align-self: flex-start;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-bottom-left-radius: var(--r-sm)
}

.chat-message.user {
    align-self: flex-end;
    background: rgba(245, 166, 35, .12);
    border: 1px solid rgba(245, 166, 35, .15);
    border-bottom-right-radius: var(--r-sm)
}

.chat-message .message-time {
    display: block;
    font-size: 10px;
    color: var(--c-text-muted);
    margin-top: .25rem
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: .75rem 1rem;
    align-self: flex-start
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--c-text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite
}

.typing-indicator span:nth-child(2) {
    animation-delay: .2s
}

.typing-indicator span:nth-child(3) {
    animation-delay: .4s
}

.chat-suggestions {
    align-self: flex-start;
    width: 100%;
    display: grid;
    gap: .45rem;
    padding: .15rem 0 .25rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    animation: fadeInUp .3s ease
}

.chat-suggestions>span {
    color: var(--c-text-muted);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase
}

.chat-suggestion-list {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem
}

.chat-suggestion-list button {
    width: auto;
    max-width: 100%;
    min-height: 34px;
    border: 1px solid rgba(20, 119, 248, .38);
    border-radius: var(--r-full);
    background: #fff;
    color: var(--c-primary);
    padding: .48rem .72rem;
    text-align: left;
    font-size: .72rem;
    font-weight: 850;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(20, 119, 248, .08);
    transition: transform var(--t-base), border-color var(--t-base), background var(--t-base), color var(--t-base)
}

.chat-suggestion-list button:hover {
    transform: translateY(-1px);
    border-color: rgba(20, 119, 248, .72);
    background: #eef6ff;
    color: #0d6fe8;
    box-shadow: 0 10px 22px rgba(20, 119, 248, .16)
}

.chat-suggestion-list button.active {
    border-color: var(--c-primary);
    background: #eef6ff;
    color: var(--c-primary)
}

.chat-suggestion-list button:disabled {
    cursor: wait;
    opacity: .72
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0)
    }

    30% {
        transform: translateY(-8px)
    }
}

/* Chat Input */
.chat-input-area {
    padding: .75rem 1rem;
    border-top: 1px solid var(--c-border);
    display: flex;
    gap: .5rem;
    align-items: flex-end
}

.chat-input {
    flex: 1;
    padding: .65rem 1rem;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    color: var(--c-text);
    font-family: var(--f-body);
    font-size: .875rem;
    outline: none;
    resize: none;
    max-height: 100px;
    transition: border-color var(--t-base)
}

.chat-input:focus {
    border-color: var(--c-primary)
}

.chat-send {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--g-primary);
    border: none;
    border-radius: var(--r-md);
    color: #0a0e1a;
    cursor: pointer;
    font-size: 1.125rem;
    transition: all var(--t-base)
}

.chat-send:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow)
}

.chat-send img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1)
}

.chat-send:disabled {
    opacity: .4;
    cursor: not-allowed;
    transform: none
}

/* API Key Overlay */
.api-key-section {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--c-border)
}

.api-key-section p {
    font-size: .75rem;
    color: var(--c-text-muted);
    margin-bottom: .75rem
}

.api-key-row {
    display: flex;
    gap: .5rem
}

.api-key-row .form-input {
    flex: 1;
    font-size: .75rem;
    padding: .5rem .75rem
}

/* =================== RESPONSIVE =================== */
@media(max-width:1024px) {
    .hero {
        min-height: auto;
        padding-top: 130px;
        padding-bottom: 3rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center
    }

    .hero-content {
        max-width: 100%;
        margin: 0 auto
    }

    .hero-text {
        margin-left: auto;
        margin-right: auto
    }

    .hero-buttons {
        justify-content: center
    }

    .hero-stats {
        justify-content: center
    }

    .hero-visual {
        margin-top: 2rem
    }

    .hero h1 {
        font-size: 2.35rem
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .about .container {
        grid-template-columns: 1fr
    }

    .about-image {
        max-width: 500px;
        margin: 0 auto
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem
    }
}

@media(max-width:768px) {
    .hero h1 {
        font-size: 2.5rem
    }

    .floating-badge {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .floating-badge.badge-top {
        right: 10px;
        top: 10px;
    }

    .floating-badge.badge-bottom {
        left: 10px;
        bottom: 10px;
    }

    .section-title {
        font-size: 1.75rem
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--c-bg-section);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        transition: right var(--t-slow);
        border-left: 1px solid var(--c-border);
        z-index: 104
    }

    .nav-links.active {
        right: 0
    }

    .hamburger {
        display: flex
    }

    .nav-cta {
        margin-left: 0;
        margin-top: 1.5rem
    }

    .services-grid {
        grid-template-columns: 1fr
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem
    }

    .process-steps {
        grid-template-columns: 1fr;
        gap: 2rem
    }

    .process-steps::before {
        display: none
    }

    .testimonial-card {
        flex: 0 0 calc(80% - .75rem)
    }

    .contact-info {
        grid-template-columns: 1fr
    }

    .footer-grid {
        grid-template-columns: 1fr
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center
    }

    .chat-panel {
        width: calc(100% - 3rem);
        height: 70vh;
        bottom: calc(1.5rem + 70px)
    }

    .service-options {
        grid-template-columns: 1fr
    }
}

@media(max-width:480px) {
    .container {
        padding: 0 1rem
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem
    }

    .hero-buttons {
        flex-direction: column
    }

    .hero-buttons .btn {
        width: 100%
    }

    .cta-card {
        padding: 2rem
    }

    .chat-input-area {
        align-items: center;
        gap: .5rem;
        padding: .65rem .75rem;
    }

    .chat-input {
        min-width: 0;
        width: 100%;
        height: 44px;
        min-height: 44px;
        max-height: 84px;
        padding: .68rem .8rem;
        font-size: 1rem;
        line-height: 1.25;
        overflow-y: auto;
    }

    .chat-send {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .chat-send img {
        width: 19px;
        height: 19px;
    }
}

/* Concept layout overrides for rules above that belong to the previous template. */
.modal .btn-secondary {
    color: var(--c-text-heading);
    border-color: var(--c-border);
    background: #fff;
}

.modal-close,
.chat-header-actions button {
    background: rgba(8, 22, 43, .06);
}

.form-input,
.form-select,
.form-textarea {
    background: #fff;
}

.progress-step {
    background: rgba(8, 22, 43, .1);
}

@media(max-width:1024px) {
    .hero {
        min-height: 690px;
        height: auto;
        padding-top: 0;
        padding-bottom: 0;
    }

    .hero .container {
        text-align: left;
    }

    .hero-content {
        max-width: 650px;
        margin: 0;
    }

    .hero-text {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-buttons {
        justify-content: flex-start;
    }

    .hero-stats {
        justify-content: initial;
    }

    .about .container {
        grid-template-columns: 1fr 1fr;
    }

    .about-image {
        max-width: none;
        margin: 0;
    }
}

@media(max-width:768px) {
    .nav-links {
        background: rgba(4, 18, 36, .98);
        border-left: 1px solid rgba(255, 255, 255, .1);
    }

    .nav-links a {
        color: rgba(255, 255, 255, .84);
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: #fff;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .about .container {
        grid-template-columns: 1fr;
    }
}

@media(max-width:620px) {
    .choice-grid,
    .effort-grid,
    .factor-grid,
    .price-bands {
        grid-template-columns: 1fr;
    }

    .urgency-toggle {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .urgency-icon {
        width: 44px;
        height: 44px;
    }

    .urgency-icon svg {
        width: 27px;
        height: 27px;
    }

    .urgency-toggle .toggle-switch {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .hero {
        min-height: 700px;
        align-items: flex-start;
    }

    .hero .container {
        padding-top: 6.5rem;
    }

    .hero h1 {
        font-size: 2.15rem;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
    }
}
