/* =========================================================
   Article page (Views/Mag/ReadMags)
   ========================================================= */

:root {
    --rm-primary: #1e88e5;
    --rm-primary-soft: #e8f2fd;
    --rm-accent: #fb9017;
    --rm-ink: #1f2937;
    --rm-text: #374151;
    --rm-muted: #6b7280;
    --rm-line: #edf1f6;
    --rm-bg: #f5f8fc;
    --rm-radius: 20px;
    --rm-shadow: 0 10px 30px -18px rgba(15, 35, 70, .35);
    --rm-shadow-lg: 0 24px 50px -20px rgba(15, 35, 70, .4);
    --rm-ease: cubic-bezier(.22, .61, .36, 1);
}

body {
    background: var(--rm-bg);
}

/* reading progress */
.rm-progress {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1100;
    height: 4px;
    background: transparent;
    pointer-events: none;
}

    .rm-progress span {
        display: block;
        width: 0;
        height: 100%;
        margin-right: 0;
        margin-left: auto;
        background: linear-gradient(90deg, var(--rm-primary), var(--rm-accent));
        border-radius: 0 0 0 4px;
        transition: width .1s linear;
    }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.rm-hero {
    position: relative;
    z-index: 0;
    isolation: isolate;
    padding: 70px 0 150px;
    overflow: hidden;
    color: #fff;
    background: #0f1d33;
}

.rm-hero-bg {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(3px) saturate(115%);
    transform: scale(1.05);
}

.rm-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 20, 40, .55) 0%, rgba(10, 20, 40, .82) 100%);
}

.rm-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    text-align: center;
}

.rm-breadcrumb {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 7px 16px;
    margin-bottom: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 13px;
}

    .rm-breadcrumb a {
        color: rgba(255, 255, 255, .85);
        transition: color .2s ease;
    }

        .rm-breadcrumb a:hover {
            color: #fff;
            text-decoration: none;
        }

    .rm-breadcrumb > i {
        font-size: 9px;
        opacity: .6;
    }

    .rm-breadcrumb span {
        max-width: 260px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        color: var(--rm-accent);
        font-weight: 600;
    }

.rm-hero-category {
    display: inline-block;
    padding: 5px 14px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: var(--rm-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 18px -8px rgba(251, 144, 23, .8);
}

.rm-hero-title {
    margin: 0 auto 24px;
    color: #fff;
    font-size: 34px;
    font-weight: 900;
    line-height: 1.7;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .3);
}

.rm-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 22px;
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
}

    .rm-hero-meta i {
        margin-left: 5px;
        color: var(--rm-accent);
    }

.rm-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #fff;
}

.rm-avatar {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #42a5f5, var(--rm-primary));
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

.rm-avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 26px;
    box-shadow: 0 10px 22px -10px rgba(30, 136, 229, .8);
}

/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */
.rm-page {
    position: relative;
    z-index: 2;
    margin-top: -100px;
    padding-bottom: 40px;
}

.rm-card {
    position: relative;
    margin-bottom: 26px;
    padding: 26px;
    background: #fff;
    border: 1px solid var(--rm-line);
    border-radius: var(--rm-radius);
    box-shadow: var(--rm-shadow);
}

.rm-section-title {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    padding-bottom: 12px;
    color: var(--rm-ink);
    font-size: 20px;
    font-weight: 800;
}

    .rm-section-title::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        width: 44px;
        height: 4px;
        border-radius: 4px;
        background: linear-gradient(90deg, var(--rm-accent), var(--rm-primary));
    }

.rm-count {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--rm-primary-soft);
    color: var(--rm-primary);
    font-size: 13px;
}

/* ---------------------------------------------------------
   Article
   --------------------------------------------------------- */
.rm-article {
    padding: 14px 14px 30px;
}

.rm-cover {
    margin: 0 0 26px;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #e2e8f0;
}

    .rm-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 1.2s var(--rm-ease);
    }

    .rm-cover:hover img {
        transform: scale(1.03);
    }

.rm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 18px;
    margin-bottom: 18px;
}

.rm-chip {
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--rm-primary-soft);
    color: var(--rm-primary);
    font-size: 12px;
    font-weight: 700;
}

/* article typography (HTML comes from the CMS editor) */
.rm-content {
    padding: 0 18px;
    color: var(--rm-text);
    font-size: 16px !important;
    line-height: 2.2 !important;
    text-align: justify;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

    .rm-content * {
        max-width: 100% !important;
        font-family: inherit !important;
    }

    .rm-content p,
    .rm-content span,
    .rm-content div,
    .rm-content li {
        font-size: inherit !important;
        line-height: inherit !important;
    }

    .rm-content p {
        margin: 0 0 1.3em;
    }

    .rm-content h1,
    .rm-content h2,
    .rm-content h3,
    .rm-content h4 {
        color: var(--rm-ink) !important;
        font-weight: 800;
        line-height: 1.7 !important;
        margin: 1.8em 0 .8em;
        scroll-margin-top: 110px;
    }

    .rm-content h1,
    .rm-content h2 {
        position: relative;
        padding-right: 16px;
        font-size: 22px !important;
    }

        .rm-content h1::before,
        .rm-content h2::before {
            content: "";
            position: absolute;
            right: 0;
            top: .35em;
            bottom: .35em;
            width: 5px;
            border-radius: 5px;
            background: linear-gradient(180deg, var(--rm-accent), var(--rm-primary));
        }

    .rm-content h3 {
        font-size: 19px !important;
        color: var(--rm-primary) !important;
    }

    .rm-content h4 {
        font-size: 17px !important;
    }

    .rm-content a {
        color: var(--rm-primary);
        font-weight: 600;
        text-decoration: none;
        background-image: linear-gradient(currentColor, currentColor);
        background-size: 0 2px;
        background-position: 100% 100%;
        background-repeat: no-repeat;
        transition: background-size .3s var(--rm-ease);
    }

        .rm-content a:hover {
            background-size: 100% 2px;
        }

    .rm-content img {
        display: block;
        width: auto !important;
        height: auto !important;
        margin: 1.6em auto;
        border-radius: 14px;
        box-shadow: var(--rm-shadow);
    }

    .rm-content figure {
        margin: 1.6em 0;
    }

    .rm-content figcaption {
        margin-top: 8px;
        color: var(--rm-muted);
        font-size: 13px !important;
        text-align: center;
    }

    .rm-content ul,
    .rm-content ol {
        margin: 0 0 1.4em;
        padding-right: 1.4em;
    }

    .rm-content li {
        margin-bottom: .4em;
    }

        .rm-content li::marker {
            color: var(--rm-accent);
            font-weight: 700;
        }

    .rm-content blockquote {
        position: relative;
        margin: 1.8em 0;
        padding: 20px 24px 20px 20px;
        border: 0;
        border-right: 4px solid var(--rm-accent);
        border-radius: 12px;
        background: #fff8ef;
        color: var(--rm-ink);
        font-weight: 500;
    }

    .rm-content table {
        width: 100% !important;
        margin: 1.6em 0;
        border-collapse: separate;
        border-spacing: 0;
        border: 1px solid var(--rm-line);
        border-radius: 12px;
        overflow: hidden;
        font-size: 14px;
    }

        .rm-content table th,
        .rm-content table td {
            padding: 10px 14px !important;
            border: 0 !important;
            border-bottom: 1px solid var(--rm-line) !important;
            text-align: right !important;
        }

        .rm-content table th,
        .rm-content table tr:first-child td {
            background: var(--rm-primary-soft);
            color: var(--rm-ink);
            font-weight: 700;
        }

        .rm-content table tr:nth-child(even) td {
            background: #fafbfd;
        }

    .rm-content iframe,
    .rm-content video {
        width: 100% !important;
        border: 0;
        border-radius: 14px;
    }

/* tags */
.rm-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 30px 18px 0;
    padding-top: 22px;
    border-top: 1px dashed var(--rm-line);
}

.rm-tags-label {
    color: var(--rm-ink);
    font-size: 14px;
    font-weight: 700;
    margin-left: 4px;
}

    .rm-tags-label i {
        color: var(--rm-accent);
    }

.rm-tag {
    padding: 4px 12px;
    border: 1px solid var(--rm-line);
    border-radius: 999px;
    background: #fafbfd;
    color: var(--rm-muted);
    font-size: 12px;
    transition: all .25s ease;
}

    .rm-tag:hover {
        border-color: var(--rm-primary);
        color: var(--rm-primary);
        background: #fff;
    }

/* share */
.rm-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 22px 18px 0;
    padding: 16px 20px;
    border-radius: 16px;
    background: var(--rm-bg);
}

.rm-share-label {
    color: var(--rm-ink);
    font-size: 14px;
    font-weight: 700;
}

    .rm-share-label i {
        color: var(--rm-primary);
        margin-left: 6px;
    }

.rm-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rm-share-btn {
    height: 40px;
    min-width: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: var(--rm-muted);
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 12px -6px rgba(15, 35, 70, .3);
    transition: transform .25s var(--rm-ease), background .25s ease, color .25s ease;
}

    .rm-share-btn:hover {
        transform: translateY(-3px);
        color: #fff !important;
        text-decoration: none;
    }

    .rm-share-btn.is-telegram:hover { background: #229ed9; }
    .rm-share-btn.is-whatsapp:hover { background: #25d366; }
    .rm-share-btn.is-twitter:hover { background: #111827; }
    .rm-share-btn.is-linkedin:hover { background: #0a66c2; }

    .rm-share-btn.is-copy {
        font-size: 13px;
        font-weight: 600;
    }

        .rm-share-btn.is-copy:hover,
        .rm-share-btn.is-copy.is-done {
            background: var(--rm-accent);
            color: #fff;
        }

/* author */
.rm-author-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

    .rm-author-card small {
        color: var(--rm-accent);
        font-weight: 700;
    }

    .rm-author-card h4 {
        margin: 2px 0 6px;
        color: var(--rm-ink);
        font-size: 18px;
        font-weight: 800;
    }

    .rm-author-card p {
        margin: 0;
        color: var(--rm-muted);
        font-size: 13px;
        line-height: 2;
    }

/* related */
.rm-related {
    margin: 36px 0 10px;
}

.rm-related-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--rm-shadow);
    color: var(--rm-ink);
    transition: transform .4s var(--rm-ease), box-shadow .4s var(--rm-ease);
}

    .rm-related-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--rm-shadow-lg);
        text-decoration: none;
        color: var(--rm-ink);
    }

.rm-related-img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e2e8f0;
}

    .rm-related-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .8s var(--rm-ease);
    }

.rm-related-card:hover .rm-related-img img {
    transform: scale(1.08);
}

.rm-related-card h5 {
    margin: 14px 16px 8px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rm-related-more {
    margin: auto 16px 16px;
    color: var(--rm-accent);
    font-size: 13px;
    font-weight: 700;
}

    .rm-related-more i {
        transition: transform .3s var(--rm-ease);
    }

.rm-related-card:hover .rm-related-more i {
    transform: translateX(-5px);
}

/* ---------------------------------------------------------
   Comments
   --------------------------------------------------------- */
.rm-comment-list {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}

.rm-comment {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--rm-line);
}

    .rm-comment:last-child {
        border-bottom: 0;
    }

    .rm-comment .rm-avatar {
        box-shadow: none;
        background: linear-gradient(135deg, #ffb74d, var(--rm-accent));
    }

.rm-comment-body {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border-radius: 4px 16px 16px 16px;
    background: var(--rm-bg);
}

.rm-comment-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 14px;
    margin-bottom: 6px;
}

    .rm-comment-head strong {
        color: var(--rm-ink);
        font-size: 14px;
    }

    .rm-comment-head span {
        color: var(--rm-muted);
        font-size: 12px;
    }

.rm-comment-body p {
    margin: 0;
    color: var(--rm-text);
    font-size: 14px;
    line-height: 2;
    white-space: pre-line;
}

.rm-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    margin-bottom: 30px;
    border: 1.5px dashed #d6dde8;
    border-radius: 14px;
    color: var(--rm-muted);
    font-size: 14px;
}

    .rm-empty i {
        color: var(--rm-primary);
        font-size: 22px;
    }

.rm-comment-form {
    padding: 24px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
    border: 1px solid var(--rm-line);
}

    .rm-comment-form h4 {
        margin: 0 0 4px;
        color: var(--rm-ink);
        font-size: 17px;
        font-weight: 800;
    }

.rm-note {
    margin: 0 0 18px;
    color: var(--rm-muted);
    font-size: 12px;
}

.rm-field {
    position: relative;
    display: block;
    margin: 0;
}

    .rm-field i {
        position: absolute;
        top: 50%;
        right: 16px;
        transform: translateY(-50%);
        color: var(--rm-muted);
        pointer-events: none;
        transition: color .2s ease;
    }

    .rm-field input,
    .rm-field textarea {
        width: 100%;
        border: 1.5px solid #e2e8f0;
        border-radius: 12px;
        background: #fff;
        color: var(--rm-ink);
        font-size: 14px;
        transition: border-color .2s ease, box-shadow .2s ease;
    }

    .rm-field input {
        height: 50px;
        padding: 0 44px 0 16px;
    }

    .rm-field textarea {
        min-height: 130px;
        padding: 14px 16px;
        resize: vertical;
        line-height: 2;
    }

        .rm-field input:focus,
        .rm-field textarea:focus {
            outline: none;
            border-color: var(--rm-primary);
            box-shadow: 0 0 0 4px rgba(30, 136, 229, .15);
        }

    .rm-field:focus-within i {
        color: var(--rm-primary);
    }

.rm-alert {
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
}

    .rm-alert.is-success {
        background: #ecfdf5;
        color: #047857;
        border: 1px solid #a7f3d0;
    }

    .rm-alert.is-error {
        background: #fef2f2;
        color: #b91c1c;
        border: 1px solid #fecaca;
    }

.rm-submit {
    height: 50px;
    padding: 0 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--rm-accent), #ff6a3d);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 24px -10px rgba(251, 144, 23, .8);
    transition: transform .25s var(--rm-ease), box-shadow .25s var(--rm-ease);
}

    .rm-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 28px -10px rgba(251, 144, 23, .9);
    }

    .rm-submit i {
        transform: scaleX(-1);
    }

/* ---------------------------------------------------------
   Sidebar
   --------------------------------------------------------- */
.rm-sidebar {
    position: sticky;
    top: 110px;
}

.rm-side-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--rm-ink);
    font-size: 17px;
    font-weight: 800;
}

    .rm-side-title i {
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: #fff3e3;
        color: var(--rm-accent);
        font-size: 15px;
    }

/* table of contents */
.rm-toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc;
    max-height: 320px;
    overflow-y: auto;
}

.rm-toc li {
    counter-increment: toc;
}

    .rm-toc li a {
        position: relative;
        display: block;
        padding: 8px 34px 8px 8px;
        border-radius: 10px;
        color: var(--rm-text);
        font-size: 14px;
        line-height: 1.8;
        transition: background .2s ease, color .2s ease;
    }

        .rm-toc li a::before {
            content: counter(toc);
            position: absolute;
            right: 6px;
            top: 9px;
            width: 22px;
            height: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: var(--rm-primary-soft);
            color: var(--rm-primary);
            font-size: 11px;
            font-weight: 700;
        }

        .rm-toc li a:hover {
            background: var(--rm-bg);
            color: var(--rm-primary);
            text-decoration: none;
        }

    .rm-toc li.is-sub a {
        padding-right: 50px;
        font-size: 13px;
        color: var(--rm-muted);
    }

        .rm-toc li.is-sub a::before {
            content: "";
            right: 30px;
            top: 50%;
            width: 6px;
            height: 6px;
            margin-top: -3px;
            background: #cbd5e1;
        }

/* popular list */
.rm-popular {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .rm-popular li + li {
        border-top: 1px solid var(--rm-line);
    }

    .rm-popular a {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 12px 0;
        color: var(--rm-ink);
    }

        .rm-popular a:hover {
            text-decoration: none;
        }

.rm-popular-img {
    position: relative;
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    border-radius: 14px;
    overflow: hidden;
    background: #e2e8f0;
}

    .rm-popular-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .6s var(--rm-ease);
    }

    .rm-popular-img b {
        position: absolute;
        top: 6px;
        right: 6px;
        width: 22px;
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: var(--rm-accent);
        color: #fff;
        font-size: 11px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
    }

.rm-popular a:hover .rm-popular-img img {
    transform: scale(1.1);
}

.rm-popular-text {
    min-width: 0;
}

    .rm-popular-text strong {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.8;
        transition: color .2s ease;
    }

    .rm-popular-text small {
        color: var(--rm-muted);
        font-size: 12px;
    }

.rm-popular a:hover .rm-popular-text strong {
    color: var(--rm-primary);
}

/* call to action */
.rm-cta {
    position: relative;
    margin-bottom: 26px;
    padding: 28px 24px;
    border-radius: var(--rm-radius);
    overflow: hidden;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: #fff;
    box-shadow: 0 20px 40px -18px rgba(30, 136, 229, .8);
}

    .rm-cta::before {
        content: "";
        position: absolute;
        top: -60px;
        left: -60px;
        width: 180px;
        height: 180px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .1);
    }

.rm-cta-icon {
    position: absolute;
    top: 22px;
    left: 22px;
    font-size: 42px;
    opacity: .25;
}

.rm-cta h4 {
    position: relative;
    margin: 0 0 8px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.rm-cta p {
    position: relative;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
    line-height: 2;
}

.rm-cta a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    background: var(--rm-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    transition: transform .25s var(--rm-ease), background .25s ease;
}

    .rm-cta a:hover {
        transform: translateY(-2px);
        background: #ff7a1a;
        color: #fff;
        text-decoration: none;
    }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 991.98px) {
    .rm-sidebar {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .rm-hero {
        padding: 40px 0 110px;
    }

    .rm-hero-title {
        font-size: 23px;
    }

    .rm-hero-meta {
        gap: 8px 14px;
        font-size: 12px;
    }

    .rm-page {
        margin-top: -80px;
    }

    .rm-card {
        padding: 18px;
    }

    .rm-article {
        padding: 10px 10px 22px;
    }

    .rm-content,
    .rm-chips {
        padding: 0 6px;
    }

    .rm-content {
        font-size: 15px !important;
        text-align: right;
    }

    .rm-tags,
    .rm-share {
        margin-right: 6px;
        margin-left: 6px;
    }

    .rm-author-card {
        flex-direction: column;
        text-align: center;
    }

    .rm-comment-form {
        padding: 16px;
    }

    .rm-submit {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rm-page *,
    .rm-progress span {
        transition: none !important;
    }
}

/* tablets and phones: the table of contents would land after the whole article */
@media (max-width: 991.98px) {
    .rm-toc {
        display: none !important;
    }
}

/* phones */
@media (max-width: 575.98px) {
    /* keep the breadcrumb on one line: drop the (long) article title */
    .rm-breadcrumb > span,
    .rm-breadcrumb > i:last-of-type {
        display: none;
    }

    .rm-hero-title {
        font-size: 21px;
        line-height: 1.8;
    }

    .rm-hero-meta .rm-avatar {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    /* compact related-article cards */
    .rm-related .row > [class*="col-"] {
        margin-bottom: 12px !important;
    }

    /* image | title over "read more" (the card has no inner wrapper, so use a grid) */
    .rm-related-card {
        display: grid;
        grid-template-columns: 116px 1fr;
        grid-template-rows: 1fr auto;
        border-radius: 16px;
    }

    .rm-related-img {
        grid-column: 1;
        grid-row: 1 / span 2;
        aspect-ratio: auto;
        min-height: 92px;
    }

    .rm-related-card h5,
    .rm-related-more {
        grid-column: 2;
    }

    .rm-related-card h5 {
        margin: 12px 12px 6px;
        font-size: 13.5px;
    }

    .rm-related-more {
        margin: auto 12px 12px;
        font-size: 12px;
    }

    .rm-share {
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
    }

    .rm-share-buttons {
        justify-content: space-between;
    }

    .rm-share-btn {
        flex: 1;
        min-width: 0;
        padding: 0 6px;
    }

        .rm-share-btn.is-copy {
            flex: 2;
        }

    .rm-comment {
        gap: 10px;
    }

        .rm-comment .rm-avatar {
            width: 30px;
            height: 30px;
            font-size: 13px;
        }

    .rm-comment-body {
        padding: 12px 14px;
    }
}
