* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background: #001b49;
    color: #f7f9ff;
}

body {
    min-height: 100vh;
}

.top-header {
    height: 88px;
    background: #f7f7f8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    border-top: 4px solid #202020;
}

.brand {
    font-size: 38px;
    font-weight: 300;
    letter-spacing: -1.6px;
    color: #242936;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: #242936;
}

.header-logout {
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
}

    .header-logout:hover {
        background: #e8e8e8;
        color: #000;
    }

.neosentia-page {
    min-height: calc(100vh - 88px);
    padding: 72px 24px;
    background: radial-gradient(circle at 20% 10%, rgba(52, 105, 200, 0.22), transparent 36%), radial-gradient(circle at 80% 20%, rgba(48, 94, 170, 0.2), transparent 30%), linear-gradient(180deg, #001943 0%, #001638 100%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.hero-card {
    width: min(100%, 1500px);
    background: linear-gradient(180deg, rgba(24, 45, 78, 0.96), rgba(18, 34, 62, 0.98));
    border: 1px solid rgba(143, 171, 220, 0.18);
    border-radius: 44px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 58px 84px 64px;
}

.login-card {
    max-width: 1500px;
    min-height: 560px;
    text-align: center;
}

.wisdom-card {
    max-width: 1500px;
}

.wisdom-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 48px;
    align-items: center;
}

.wisdom-hero-text {
    min-width: 0;
}

.twin-owner-image-wrap {
    width: 260px;
    height: 260px;
    border-radius: 34px;
    overflow: hidden;
    background: #ffffff; /* match image background */

    border: 1px solid rgba(190, 210, 245, 0.24);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
}

.twin-owner-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}


h1 {
    margin: 0;
    color: #f7f9ff;
    font-size: clamp(48px, 5.6vw, 86px);
    line-height: 0.98;
    font-weight: 800;
    letter-spacing: -3.6px;
}

.subtitle {
    margin: 24px auto 0;
    color: #c7d7f4;
    font-size: clamp(22px, 2vw, 31px);
    line-height: 1.25;
    font-weight: 600;
}

.microcopy {
    margin: 28px auto 0;
    color: rgba(224, 233, 252, 0.72);
    font-size: 22px;
    line-height: 1.45;
}

.login-form {
    max-width: 520px;
    margin: 54px auto 0;
    text-align: left;
}

.field-group {
    margin-top: 28px;
}

    .field-group label {
        display: block;
        margin-bottom: 10px;
        color: #eef4ff;
        font-size: 20px;
        font-weight: 750;
    }

input {
    width: 100%;
    min-height: 58px;
    border-radius: 16px;
    border: 1px solid rgba(190, 210, 245, 0.22);
    background: rgba(255, 255, 255, 0.96);
    color: #15213a;
    font-size: 20px;
    padding: 14px 18px;
    outline: none;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

    input:focus {
        border-color: #90b7ff;
        box-shadow: 0 0 0 4px rgba(144, 183, 255, 0.2), 0 14px 32px rgba(0, 0, 0, 0.16);
    }

button {
    font-family: inherit;
    cursor: pointer;
}

.primary-button {
    margin-top: 30px;
    min-height: 58px;
    padding: 0 34px;
    background: #f7f9ff;
    color: #0d2148;
    font-size: 20px;
    font-weight: 750;
    border-radius: 999px;
    border: none;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

    .primary-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 22px 52px rgba(0, 0, 0, 0.3);
    }

.secondary-button {
    min-height: 52px;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.1);
    color: #eef4ff;
    font-size: 18px;
    font-weight: 750;
    border-radius: 999px;
    border: 1px solid rgba(190, 210, 245, 0.22);
    transition: background 0.18s ease, transform 0.18s ease;
}

    .secondary-button:hover {
        background: rgba(255, 255, 255, 0.16);
        transform: translateY(-1px);
    }

    .secondary-button.recording {
        background: #b00020;
        color: #fff;
    }

.action-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 36px;
    margin-bottom: 16px;
}

.editor-shell {
    width: 100%;
    height: 420px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(190, 210, 245, 0.28);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

    .editor-shell .ql-toolbar.ql-snow {
        height: 58px;
        border: none !important;
        border-bottom: 1px solid #dce3f0 !important;
        background: linear-gradient(180deg, #fbfcff 0%, #f2f5fb 100%);
        padding: 12px 18px !important;
        display: flex;
        align-items: center;
    }

    .editor-shell .ql-toolbar .ql-formats {
        margin-right: 16px !important;
    }

    .editor-shell .ql-toolbar button,
    .editor-shell .ql-toolbar .ql-picker-label {
        color: #20304e !important;
    }

        .editor-shell .ql-toolbar button:hover,
        .editor-shell .ql-toolbar button.ql-active,
        .editor-shell .ql-toolbar .ql-picker-label:hover {
            color: #001b49 !important;
        }

        .editor-shell .ql-toolbar button svg,
        .editor-shell .ql-toolbar .ql-picker-label svg {
            stroke: #20304e !important;
        }

    .editor-shell .ql-container.ql-snow {
        border: none !important;
        height: calc(420px - 58px);
        background: #ffffff;
        font-size: 18px;
    }

    .editor-shell .ql-editor {
        padding: 26px 28px !important;
        line-height: 1.65;
        color: #17213a;
        min-height: 100%;
        font-size: 18px;
    }

        .editor-shell .ql-editor.ql-blank::before {
            color: rgba(23, 33, 58, 0.42);
            font-style: italic;
            left: 28px !important;
            right: 28px !important;
        }

.progress-wrap {
    margin-top: 24px;
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    height: 18px;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 18px;
    width: 0%;
    background: #9dbdff;
    transition: width 0.2s ease;
}

.status-message {
    min-height: 28px;
    margin-top: 18px;
    font-size: 18px;
    color: #d8e6ff;
}

.success-text {
    color: #8df1b1;
}

.error-text,
.error-message {
    color: #ffb3bf;
}

.listening {
    color: #dbe8ff;
    font-weight: 750;
}

@media (max-width: 900px) {
    .top-header {
        height: 76px;
        padding: 0 22px;
    }

    .brand {
        font-size: 32px;
    }

    .header-title {
        font-size: 14px;
    }

    .neosentia-page {
        min-height: calc(100vh - 76px);
        padding: 34px 16px;
    }

    .hero-card {
        border-radius: 28px;
        padding: 40px 24px;
    }

    .wisdom-hero {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .twin-owner-image-wrap {
        width: 190px;
        height: 190px;
        border-radius: 28px;
    }

    h1 {
        font-size: 48px;
        letter-spacing: -2.2px;
    }

    .subtitle {
        font-size: 21px;
    }

    .microcopy {
        font-size: 18px;
    }

    .editor-shell {
        height: 380px;
        border-radius: 18px;
    }

        .editor-shell .ql-container.ql-snow {
            height: calc(380px - 58px);
        }
}
.speech-language-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #eef4ff;
    font-size: 16px;
    font-weight: 650;
}

    .speech-language-wrap select {
        min-height: 44px;
        border-radius: 999px;
        border: 1px solid rgba(190, 210, 245, 0.22);
        background: rgba(255, 255, 255, 0.96);
        color: #15213a;
        font-size: 16px;
        font-weight: 600;
        padding: 0 16px;
        outline: none;
    }
