/* Route articles — public landing + instructor cabinet */
.ra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.ra-card {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, .45);
    background: rgba(255,255,255,.92);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ra-card__img-wrap {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f1f5f9;
}

.ra-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ra-card__body {
    padding: 14px 16px;
}

.ra-card__title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 8px;
}

.ra-card__title a {
    color: inherit;
    text-decoration: none;
}

.ra-card__title a:hover {
    color: #4f46e5;
}

.ra-card__lead {
    font-size: .92rem;
    color: #64748b;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ra-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: .82rem;
    color: #64748b;
}

.ra-back {
    margin-top: 24px;
}

.ra-article-hero__route {
    font-size: .95rem;
    color: #64748b;
    margin-bottom: 6px;
}

.ra-article-hero__lead {
    font-size: 1.1rem;
    color: #334155;
    max-width: 52rem;
}

.ra-author {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(99,102,241,.06);
    border: 1px solid rgba(99,102,241,.15);
}

.ra-author__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.ra-author__label {
    font-size: .78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ra-author__name {
    font-weight: 800;
}

.ra-author__date {
    font-size: .85rem;
    color: #64748b;
}

.ra-author__book {
    margin-left: auto;
}

.ra-video__embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.ra-video__embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ra-video__file {
    width: 100%;
    max-height: 480px;
    border-radius: 14px;
    background: #0f172a;
}

.ra-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.ra-gallery__item img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.ra-body__content {
    line-height: 1.65;
    font-size: 1.02rem;
}

.ra-body__content h2,
.ra-body__content h3 {
    margin-top: 1.2em;
    font-weight: 800;
}

.ra-body__content img {
    display: block;
    max-width: 300px;
    width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
}

.ra-qna__form {
    max-width: 640px;
    margin-bottom: 20px;
}

.ra-qna__list {
    display: grid;
    gap: 14px;
}

.ra-qna__item {
    border: 1px solid rgba(148, 163, 184, .4);
    border-radius: 12px;
    padding: 14px 16px;
    background: #fff;
}

.ra-qna__q time,
.ra-qna__a time {
    font-size: .8rem;
    color: #94a3b8;
    margin-left: 8px;
}

.ra-qna__a {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(148, 163, 184, .5);
    color: #334155;
}

.ra-cabinet .ra-editor {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .9rem;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.ra-editor-wrap {
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: .375rem;
    overflow: hidden;
}

.ra-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: var(--bs-tertiary-bg, #f8f9fa);
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.ra-editor-toolbar__btn {
    border: 1px solid var(--bs-border-color, #ced4da);
    background: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: .82rem;
    line-height: 1.5;
    cursor: pointer;
    color: inherit;
}

.ra-editor-toolbar__btn:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
}

.ra-editor-toolbar__btn:active {
    background: #e0e7ff;
}

.ra-editor-toolbar__sep {
    width: 1px;
    height: 20px;
    background: var(--bs-border-color, #ced4da);
    margin: 0 4px;
}

.ra-editor--dragover {
    outline: 2px dashed #6366f1;
    outline-offset: -2px;
    background: #f5f3ff;
}

.ra-drag-image--dragging {
    opacity: .55;
    cursor: grabbing;
}

.ra-drag-image:active {
    cursor: grabbing;
}

.ra-route-articles-preview {
    margin-top: 8px;
}

.ra-route-articles-preview .ra-card {
    height: 100%;
}

.ra-seo-articles__links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.ra-seo-articles__links a {
    font-weight: 700;
    text-decoration: none;
}

.ra-seo-articles__links a:hover {
    text-decoration: underline;
}

.ra-seo-articles__meta {
    font-size: .88rem;
    opacity: .75;
}

.apr-dark .ra-seo-articles__links a {
    color: #c7d2fe;
}

.apr-light .ra-seo-articles__links a {
    color: #4338ca;
}

@media (max-width: 640px) {
    .ra-author__book {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}
