/* Stories Account page */

.stories-account-page {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 16px 36px;
}

.stories-account-card {
    padding: 28px 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 8px 28px rgb(0 0 0 / 4%);
}

.stories-account-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
}

.stories-account-eyebrow {
    margin: 0 0 8px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-align: center;
}

.stories-account-card h1 {
    margin: 0 0 12px;
    color: #18181b;
    font-size: clamp(25px, 6vw, 32px);
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
}

.stories-account-intro {
    max-width: 440px;
    margin: 0 auto 26px;
    color: #71717a;
    font-size: 15px;
    line-height: 1.65;
    text-align: center;
}

.stories-account-notice {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    background: #f0fdf4;
    color: #166534;
    font-size: 14px;
}

.stories-account-details {
    margin-top: 26px;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.stories-account-details h2 {
    margin: 0 0 14px;
    color: #18181b;
    font-size: 18px;
}

.stories-account-details dl {
    margin: 0;
}

.stories-account-detail {
    display: grid;
    grid-template-columns: minmax(100px, 0.8fr) minmax(0, 1.2fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f1f3;
}

.stories-account-detail:last-child {
    border-bottom: 0;
}

.stories-account-detail dt {
    color: #71717a;
    font-size: 13px;
}

.stories-account-detail dd {
    margin: 0;
    color: #27272a;
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.stories-account-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.stories-account-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.stories-account-button-primary {
    background: #2563eb;
    color: #ffffff;
}

.stories-account-button-primary:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.stories-account-button-secondary {
    border-color: #e5e7eb;
    background: #ffffff;
    color: #27272a;
}

.stories-account-button-secondary:hover {
    background: #f9fafb;
    color: #18181b;
}

.stories-account-signout,
.stories-account-text-link {
    display: block;
    padding: 8px;
    color: #52525b;
    font-size: 14px;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.stories-account-signout:hover,
.stories-account-text-link:hover {
    color: #2563eb;
}

.stories-account-button:focus-visible,
.stories-account-signout:focus-visible,
.stories-account-text-link:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

@media (min-width: 600px) {
    .stories-account-page {
        padding-top: 40px;
        padding-bottom: 48px;
    }

    .stories-account-card {
        padding: 36px;
    }
}

/* Stories frontend authentication pages */

.stories-auth-page {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 28px 16px 40px;
}

.stories-auth-card {
    padding: 28px 22px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgb(0 0 0 / 4%);
}

.stories-auth-brand {
    display: block;
    margin-bottom: 30px;
    color: #18181b;
    font-size: 23px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.stories-auth-eyebrow {
    margin: 0 0 8px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-align: center;
}

.stories-auth-card h1 {
    margin: 0 0 12px;
    color: #18181b;
    font-size: clamp(26px, 7vw, 32px);
    line-height: 1.2;
    text-align: center;
}

.stories-auth-intro {
    margin: 0 auto 26px;
    color: #71717a;
    font-size: 15px;
    line-height: 1.65;
    text-align: center;
}

.stories-auth-error {
    margin-bottom: 20px;
    padding: 13px 14px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 14px;
    line-height: 1.5;
}

.stories-auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.stories-auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stories-auth-field label {
    color: #27272a;
    font-size: 14px;
    font-weight: 600;
}

.stories-auth-field input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d4d4d8;
    border-radius: 10px;
    background: #ffffff;
    color: #18181b;
    font: inherit;
    font-size: 15px;
}

.stories-auth-field input:focus {
    border-color: #2563eb;
    outline: 3px solid rgb(37 99 235 / 15%);
}

.stories-auth-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #52525b;
    font-size: 14px;
    cursor: pointer;
}

.stories-auth-remember input {
    width: 17px;
    height: 17px;
    accent-color: #2563eb;
}

.stories-auth-submit {
    width: 100%;
    min-height: 49px;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.stories-auth-submit:hover {
    background: #1d4ed8;
}

.stories-auth-help,
.stories-auth-switch {
    margin: 20px 0 0;
    color: #71717a;
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

.stories-auth-help a,
.stories-auth-switch a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.stories-auth-help a:hover,
.stories-auth-switch a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.stories-auth-switch {
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.stories-auth-form button:focus-visible,
.stories-auth-card a:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

@media (min-width: 600px) {
    .stories-auth-page {
        padding-top: 44px;
        padding-bottom: 48px;
    }

    .stories-auth-card {
        padding: 36px;
    }
}

/* Password reset success message */
.stories-auth-success {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid #b7e4c7;
    border-radius: 12px;
    background: #f0fff4;
    color: #216e39;
    font-size: 14px;
    line-height: 1.6;
}

/* Stories profile editing */
.stories-profile-edit-card {
    width: 100%;
}

.stories-profile-avatar-preview {
    display: flex;
    justify-content: center;
    margin: 4px 0 22px;
}

.stories-profile-avatar-preview img {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--stories-border, #e5e7eb);
}

.stories-auth-field-hint {
    margin: 7px 0 0;
    color: var(--stories-muted, #6b7280);
    font-size: 13px;
    line-height: 1.5;
}

.stories-auth-success {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid #b7e4c7;
    border-radius: 12px;
    background: #f0fff4;
    color: #216e39;
    font-size: 14px;
    line-height: 1.6;
}

/* Profile avatar image on the Account page */
.stories-account-avatar {
    overflow: hidden;
    border-radius: 50%;
}

.stories-account-avatar-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}