* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 24px;

    color: #1d2939;
    background: #f2f4f7;

    font-family: Arial, Helvetica, sans-serif;
}

button,
textarea {
    font: inherit;
}

.application {
    width: 100%;
    max-width: 900px;
    min-height: calc(100vh - 48px);
    margin: 0 auto;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 12px;

    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 24px 28px;

    border-bottom: 1px solid #e4e7ec;
}

.header h1 {
    margin: 0 0 6px;

    color: #06276e;
    font-size: 26px;
}

.header p {
    margin: 0;

    color: #667085;
}

.chat {
    flex: 1;

    padding: 28px;

    background: #f8fafc;
}

.welcome {
    max-width: 620px;
    margin: 60px auto;
    padding: 32px;

    text-align: center;

    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
}

.welcome h2 {
    margin-top: 0;

    color: #06276e;
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    max-width: 80%;
    padding: 16px 18px;

    border-radius: 12px;
}

.message-user {
    align-self: flex-end;

    color: #ffffff;
    background: #0a51c7;

    border-bottom-right-radius: 3px;
}

.message-assistant {
    align-self: flex-start;

    background: #ffffff;
    border: 1px solid #d0d5dd;

    border-bottom-left-radius: 3px;
}

.message-label {
    margin-bottom: 8px;

    font-size: 12px;
    font-weight: bold;

    opacity: 0.75;
}

.message-content {
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.question-form {
    padding: 22px 28px 26px;

    border-top: 1px solid #e4e7ec;
}

.question-form label {
    display: block;
    margin-bottom: 8px;

    font-weight: bold;
}

.question-form textarea {
    display: block;
    width: 100%;
    min-height: 105px;
    padding: 13px 15px;

    resize: vertical;

    border: 1px solid #98a2b3;
    border-radius: 7px;

    outline: none;
}

.question-form textarea:focus {
    border-color: #0a51c7;
    box-shadow: 0 0 0 3px rgba(10, 81, 199, 0.12);
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-top: 14px;

    color: #667085;
    font-size: 13px;
}

.button {
    padding: 10px 18px;

    cursor: pointer;

    border-radius: 6px;
    font-weight: bold;
}

.button-primary {
    color: #ffffff;
    background: #0a51c7;
    border: 1px solid #0a51c7;
}

.button-primary:hover {
    background: #083f9c;
}

.button-secondary {
    color: #344054;
    background: #ffffff;
    border: 1px solid #98a2b3;
}

.button-secondary:hover {
    background: #f2f4f7;
}

.error {
    margin-bottom: 20px;
    padding: 14px 16px;

    color: #912018;
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 7px;
}

@media (max-width: 650px) {
    body {
        padding: 0;
    }

    .application {
        min-height: 100vh;

        border: 0;
        border-radius: 0;
    }

    .header {
        align-items: flex-start;
        flex-direction: column;

        padding: 20px;
    }

    .chat {
        padding: 20px;
    }

    .message {
        max-width: 94%;
    }

    .question-form {
        padding: 18px 20px 22px;
    }
}




.message-content a {
    color: #0a51c7;
    text-decoration: underline;
    overflow-wrap: anywhere;
}

.message-content a:hover {
    text-decoration: none;
}

.message-user .message-content a {
    color: #ffffff;
}