body:has(.cv-builder) {
    --conversation-blue: #2563eb;
    --conversation-ink: #0f172a;
    --conversation-muted: #5b6b82;
    --conversation-line: #d8e2f0;
    --conversation-green: #15803d;
}

.resume-wizard-shell.is-conversation-mode {
    gap: 0;
}

.resume-wizard-shell.is-conversation-mode .wizard-step-header,
.resume-wizard-shell.is-conversation-mode .wizard-utility-zone,
.resume-wizard-shell.is-conversation-mode .wizard-content-context,
.resume-wizard-shell.is-conversation-mode .wizard-panel-footer {
    display: none !important;
}

.resume-wizard-shell.is-conversation-mode .wizard-main-panel {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
}

.resume-wizard-shell.is-conversation-mode .wizard-step-content {
    display: grid;
    min-height: 0;
    padding: 0;
}

.conversation-shell {
    width: min(100%, 640px);
    min-height: 0;
    align-self: stretch;
    justify-self: center;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border: 1px solid rgba(216, 226, 240, 0.96);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.11);
    overflow: hidden;
}

.conversation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 28px 18px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.conversation-assistant-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.assistant-avatar,
.conversation-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--conversation-ink);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.conversation-assistant-identity span,
.conversation-message-label {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.conversation-assistant-identity strong {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 360px;
    overflow: hidden;
    color: var(--conversation-ink);
    font-size: 0.95rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-assistant-identity strong .conversation-option-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
}

.conversation-assistant-identity strong span:last-child {
    min-width: 0;
    display: inline;
    overflow: hidden;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: 0;
    line-height: inherit;
    text-overflow: ellipsis;
    text-transform: none;
}

.conversation-progress-mini {
    width: min(150px, 34%);
    display: grid;
    gap: 7px;
    justify-items: end;
    color: #33518a;
    font-size: 0.78rem;
    font-weight: 850;
}

.conversation-progress-track {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: #e7eef8;
    overflow: hidden;
}

.conversation-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--conversation-blue), #10b981);
    transition: width 0.2s ease;
}

.conversation-thread {
    min-height: 0;
    display: grid;
    align-content: end;
    gap: 14px;
    padding: 24px 28px;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(246, 249, 253, 0.75) 0%, rgba(255, 255, 255, 0.98) 58%);
}

.conversation-message {
    min-width: 0;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.conversation-message-user {
    justify-content: flex-end;
}

.conversation-message-user .conversation-bubble {
    max-width: min(82%, 430px);
    border-color: rgba(191, 219, 254, 0.95);
    background: #eaf2ff;
    color: #102a56;
    border-bottom-right-radius: 6px;
}

.conversation-message-assistant .conversation-bubble {
    max-width: min(88%, 480px);
    border-bottom-left-radius: 6px;
}

.conversation-bubble {
    min-width: 0;
    display: grid;
    gap: 6px;
    padding: 13px 15px;
    border: 1px solid var(--conversation-line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.conversation-bubble strong {
    color: var(--conversation-ink);
    font-size: 1.04rem;
    line-height: 1.3;
}

.conversation-bubble p {
    margin: 0;
    color: var(--conversation-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.conversation-message-user .conversation-bubble p {
    color: #102a56;
    font-weight: 760;
}

.conversation-message-positive .conversation-bubble {
    border-color: rgba(187, 247, 208, 0.96);
    background: #f0fdf4;
}

.conversation-message-reassuring .conversation-bubble {
    border-color: rgba(254, 240, 138, 0.96);
    background: #fffdf0;
}

.conversation-answer-panel {
    padding: 18px 28px 26px;
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    background: #ffffff;
}

.conversation-answer-card {
    display: grid;
    gap: 14px;
}

.conversation-card-toolbar {
    display: flex;
    justify-content: flex-start;
}

.conversation-back-btn {
    min-height: 38px;
    padding: 8px 13px;
}

.conversation-option-grid,
.conversation-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.conversation-option-grid-single {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.conversation-choice-card,
.conversation-chip,
.conversation-skip-btn,
.conversation-submit-btn,
.conversation-icon-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--conversation-line);
    border-radius: 14px;
    background: #ffffff;
    color: #24344d;
    padding: 11px 14px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.conversation-choice-card {
    text-align: center;
}

.conversation-option-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--conversation-blue);
    font-size: 0.82rem;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.conversation-choice-card .conversation-option-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
}

.conversation-option-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.conversation-flag-icon {
    overflow: hidden;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14), 0 1px 2px rgba(15, 23, 42, 0.08);
}

.conversation-flag-at {
    background: linear-gradient(180deg, #ed2939 0 33.33%, #ffffff 33.33% 66.66%, #ed2939 66.66% 100%);
}

.conversation-flag-de {
    background: linear-gradient(180deg, #111827 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66% 100%);
}

.conversation-flag-ch {
    position: relative;
    background: #d52b1e;
}

.conversation-flag-ch::before,
.conversation-flag-ch::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    background: #ffffff;
    transform: translate(-50%, -50%);
}

.conversation-flag-ch::before {
    width: 52%;
    height: 18%;
}

.conversation-flag-ch::after {
    width: 18%;
    height: 52%;
}

.conversation-choice-card:hover,
.conversation-chip:hover,
.conversation-skip-btn:hover {
    border-color: rgba(37, 99, 235, 0.42);
    background: #eff6ff;
    transform: translateY(-1px);
}

.conversation-choice-card:focus-visible,
.conversation-chip:focus-visible,
.conversation-skip-btn:focus-visible,
.conversation-submit-btn:focus-visible,
.conversation-icon-btn:focus-visible,
.conversation-text-input:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.24);
    outline-offset: 2px;
}

.conversation-chip.is-selected,
.conversation-chip-custom.is-selected {
    border-color: var(--conversation-blue);
    background: var(--conversation-blue);
    color: #ffffff;
}

.conversation-chip.is-selected .conversation-option-icon,
.conversation-chip-custom.is-selected .conversation-option-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.conversation-skip-btn {
    background: #f8fafc;
    color: #475569;
}

.conversation-submit-btn {
    border-color: var(--conversation-ink);
    background: var(--conversation-ink);
    color: #ffffff;
}

.conversation-submit-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none;
}

.conversation-custom-input,
.conversation-text-answer {
    display: grid;
    gap: 10px;
}

.conversation-custom-input {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
}

.conversation-text-input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--conversation-line);
    border-radius: 14px;
    background: #f8fbff;
    color: var(--conversation-ink);
    padding: 14px 15px;
    font: inherit;
    font-size: 1rem;
    line-height: 1.45;
    resize: vertical;
}

.conversation-answer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.conversation-icon-btn {
    width: 44px;
    padding: 0;
    border-radius: 999px;
    font-size: 1.25rem;
}

.education-timeline-flow {
    display: grid;
    gap: 16px;
    animation: educationTimelineIn 0.18s ease both;
}

.education-timeline-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(82px, 110px);
    align-items: start;
    gap: 14px;
}

.education-timeline-kicker {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.education-timeline-top strong {
    display: block;
    margin-top: 3px;
    color: var(--conversation-ink);
    font-size: 1.02rem;
    line-height: 1.28;
}

.education-timeline-top p,
.education-timeline-empty p,
.education-timeline-card-main p {
    margin: 0;
    color: var(--conversation-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.education-timeline-progress {
    display: grid;
    gap: 7px;
    justify-items: end;
    color: #33518a;
    font-size: 0.78rem;
    font-weight: 850;
}

.education-timeline-progress::before {
    content: "";
    display: block;
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: #e7eef8;
    grid-row: 2;
}

.education-timeline-progress i {
    display: block;
    width: 0;
    height: 7px;
    margin-top: -14px;
    justify-self: stretch;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--conversation-blue), #10b981);
}

.education-timeline-empty {
    min-height: 96px;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 18px;
    border: 1px dashed #cbd8ea;
    border-radius: 18px;
    background: #f8fbff;
    text-align: center;
}

.education-timeline-empty span {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--conversation-blue);
}

.education-timeline-list {
    position: relative;
    display: grid;
    gap: 10px;
}

.education-timeline-list::before {
    content: "";
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 18px;
    width: 2px;
    border-radius: 999px;
    background: #dbe7f6;
}

.education-timeline-card {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--conversation-line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.education-timeline-marker {
    position: relative;
    z-index: 1;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.88rem;
}

.education-timeline-card-main {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.education-timeline-card-main strong {
    color: var(--conversation-ink);
    font-size: 0.98rem;
    line-height: 1.3;
}

.education-timeline-card-main small {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 780;
}

.education-timeline-status {
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.education-timeline-card-actions {
    display: flex;
    gap: 6px;
}

.education-timeline-card-actions .conversation-icon-btn {
    width: 38px;
    height: 38px;
    min-height: 38px;
    color: #475569;
    background: #f8fafc;
}

.education-timeline-screen {
    display: grid;
    gap: 12px;
}

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

.education-timeline-option {
    min-height: 72px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}

.education-timeline-option .conversation-option-label {
    font-size: 0.94rem;
}

.education-timeline-option small {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.35;
}

.education-timeline-input-stack {
    display: grid;
    gap: 10px;
}

.education-timeline-stage-chips {
    display: flex;
}

.education-timeline-error {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.86rem;
    font-weight: 750;
}

.education-timeline-sticky-actions {
    position: sticky;
    bottom: -26px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin: 4px -28px -26px;
    padding: 14px 28px 18px;
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), #ffffff 34%);
    backdrop-filter: blur(12px);
}

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

.cv-preview-panel.wizard-highlight {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22), 0 18px 44px rgba(15, 23, 42, 0.12);
}

@media (max-width: 1023px) {
    .conversation-shell {
        width: 100%;
        min-height: calc(100vh - 190px);
        border-radius: 18px;
    }

    .conversation-header,
    .conversation-thread,
    .conversation-answer-panel {
        padding-left: 18px;
        padding-right: 18px;
    }

    .conversation-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .conversation-progress-mini {
        width: 100%;
        justify-items: start;
    }

    .conversation-message-assistant .conversation-bubble,
    .conversation-message-user .conversation-bubble {
        max-width: calc(100% - 46px);
    }

    .conversation-option-grid-single {
        grid-template-columns: 1fr;
    }

    .conversation-custom-input {
        grid-template-columns: 1fr;
    }

    .education-timeline-top,
    .education-timeline-card {
        grid-template-columns: 1fr;
    }

    .education-timeline-progress {
        width: 100%;
        justify-items: start;
    }

    .education-timeline-list::before {
        display: none;
    }

    .education-timeline-card-actions {
        justify-content: flex-end;
    }

    .education-timeline-sticky-actions {
        bottom: -26px;
        margin-left: -18px;
        margin-right: -18px;
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 430px) {
    .conversation-thread {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .conversation-choice-card,
    .conversation-chip,
    .conversation-skip-btn,
    .conversation-submit-btn,
    .education-timeline-option {
        width: 100%;
    }

    .conversation-chip-grid,
    .conversation-answer-actions,
    .education-timeline-options,
    .education-timeline-sticky-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .education-timeline-card {
        padding: 12px;
    }
}
