::selection {
    background-color: #4f46e5;
    color: #ffffff;
}

:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 3px;
    border-radius: 4px;
}

html {
    scrollbar-width: thin;
    scrollbar-color: #c7d2fe transparent;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.richtext p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.richtext p:last-child {
    margin-bottom: 0;
}

.richtext h2 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: #111827;
}

.richtext h3 {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.richtext h4, .richtext h5, .richtext h6 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.richtext ul, .richtext ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.richtext ul {
    list-style-type: disc;
}

.richtext ol {
    list-style-type: decimal;
}

.richtext li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.richtext li::marker {
    color: #4f46e5;
}

.richtext blockquote {
    border-left: 4px solid #4f46e5;
    background-color: #eef2ff;
    border-radius: 0 1rem 1rem 0;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    color: #374151;
    font-style: italic;
}

.richtext blockquote p:last-child {
    margin-bottom: 0;
}

.richtext img {
    max-width: 100%;
    height: auto;
    border-radius: 1.25rem;
    margin: 2.5rem 0;
    box-shadow: 0 10px 40px -12px rgb(17 24 39 / 0.15);
}

.richtext a {
    color: #4f46e5;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: #c7d2fe;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}

.richtext a:hover {
    color: #4338ca;
    text-decoration-color: #4f46e5;
}

.richtext hr {
    border: none;
    height: 1px;
    background-color: #e5e7eb;
    margin: 3rem auto;
    max-width: 8rem;
}

.richtext iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 1.25rem;
    margin: 2rem 0;
    box-shadow: 0 10px 40px -12px rgb(17 24 39 / 0.15);
}

.richtext .responsive-object {
    position: relative;
    height: 0;
    overflow: hidden;
    border-radius: 1.25rem;
    margin: 2rem 0;
    box-shadow: 0 10px 40px -12px rgb(17 24 39 / 0.15);
}

.richtext .responsive-object iframe,
.richtext .responsive-object embed,
.richtext .responsive-object object {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.richtext code {
    background-color: #f3f4f6;
    border-radius: 0.375rem;
    padding: 0.125rem 0.4rem;
    font-size: 0.9em;
    color: #4338ca;
}
