:root {
    --rustud-blog-ink: #0c1d35;
    --rustud-blog-muted: #56657a;
    --rustud-blog-line: #dbe3ed;
    --rustud-blog-surface: #ffffff;
    --rustud-blog-soft: #f3f6fa;
    --rustud-blog-navy: #0b2038;
    --rustud-blog-accent: #356df3;
    --rustud-blog-accent-dark: #1e51c8;
}

html {
    scroll-behavior: smooth;
    scrollbar-color: #6f8199 #e6ebf2;
    scrollbar-width: thin;
}

html::-webkit-scrollbar,
body.rustud-blog-page::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

html::-webkit-scrollbar-track,
body.rustud-blog-page::-webkit-scrollbar-track {
    background: #e6ebf2;
}

html::-webkit-scrollbar-thumb,
body.rustud-blog-page::-webkit-scrollbar-thumb {
    background: #6f8199;
    border: 2px solid #e6ebf2;
    border-radius: 8px;
}

html::-webkit-scrollbar-thumb:hover,
body.rustud-blog-page::-webkit-scrollbar-thumb:hover {
    background: #465b75;
}

body.rustud-blog-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--rustud-blog-ink);
    background: var(--rustud-blog-soft);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.rustud-blog-page *,
body.rustud-blog-page *::before,
body.rustud-blog-page *::after {
    box-sizing: border-box;
}

body.rustud-blog-page > .rustud-site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.rustud-blog-skip {
    position: fixed;
    top: 8px;
    left: 12px;
    z-index: 300;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--rustud-blog-navy);
    border-radius: 8px;
    transform: translateY(-150%);
}

.rustud-blog-skip:focus {
    transform: translateY(0);
}

.rustud-blog-main {
    min-height: 65vh;
}

.rustud-blog-shell {
    width: min(1180px, calc(100% - 40px));
    margin-right: auto;
    margin-left: auto;
}

.rustud-blog-hero {
    padding: 76px 0 58px;
    color: #ffffff;
    background: var(--rustud-blog-navy);
    border-bottom: 1px solid #203a57;
}

.rustud-blog-hero--compact {
    padding-top: 48px;
    padding-bottom: 46px;
}

.rustud-blog-eyebrow,
.rustud-blog-section__head span,
.rustud-blog-cta span {
    display: block;
    margin-bottom: 10px;
    color: #79a2ff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.rustud-blog-hero h1,
.rustud-blog-article__header h1 {
    max-width: 900px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.06;
    letter-spacing: -.035em;
}

.rustud-blog-hero > .rustud-blog-shell > p {
    max-width: 720px;
    margin: 22px 0 0;
    color: #c9d5e5;
    font-size: 18px;
    line-height: 1.65;
}

.rustud-blog-categories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 36px;
}

.rustud-blog-categories a {
    display: flex;
    min-height: 82px;
    padding: 18px 20px;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    background: #132d49;
    border: 1px solid #2b4764;
    border-radius: 12px;
}

.rustud-blog-categories strong {
    font-size: 16px;
    line-height: 1.35;
}

.rustud-blog-categories span {
    margin-top: 6px;
    color: #9eb1c9;
    font-size: 13px;
}

.rustud-blog-categories a:hover,
.rustud-blog-categories a:focus-visible {
    background: #193958;
    border-color: #6d94ee;
}

.rustud-blog-section {
    padding-top: 64px;
    padding-bottom: 70px;
}

.rustud-blog-section__head {
    display: flex;
    margin-bottom: 26px;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.rustud-blog-section__head h2,
.rustud-blog-cta h2 {
    margin: 0;
    color: var(--rustud-blog-ink);
    font-size: clamp(27px, 3vw, 40px);
    line-height: 1.16;
    letter-spacing: -.025em;
}

.rustud-blog-section__head p {
    margin: 0;
    color: var(--rustud-blog-muted);
    font-size: 14px;
}

.rustud-blog-section__head > a {
    color: var(--rustud-blog-accent-dark);
    font-weight: 700;
    text-underline-offset: 4px;
}

.rustud-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.rustud-blog-grid--related {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rustud-blog-card {
    display: flex;
    min-width: 0;
    min-height: 320px;
    padding: 24px;
    flex-direction: column;
    background: var(--rustud-blog-surface);
    border: 1px solid var(--rustud-blog-line);
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(21, 43, 70, .06);
}

.rustud-blog-card--compact {
    min-height: 230px;
}

.rustud-blog-card__meta {
    display: flex;
    min-height: 38px;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    color: var(--rustud-blog-muted);
    font-size: 12px;
    line-height: 1.4;
}

.rustud-blog-card__meta a {
    color: var(--rustud-blog-accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.rustud-blog-card__meta time {
    flex: 0 0 auto;
    text-align: right;
}

.rustud-blog-card h3 {
    margin: 17px 0 12px;
    font-size: 21px;
    line-height: 1.28;
    letter-spacing: -.015em;
}

.rustud-blog-card h3 a {
    color: var(--rustud-blog-ink);
    text-decoration: none;
}

.rustud-blog-card h3 a:hover,
.rustud-blog-card h3 a:focus-visible {
    color: var(--rustud-blog-accent-dark);
}

.rustud-blog-card p {
    margin: 0 0 20px;
    color: var(--rustud-blog-muted);
    font-size: 15px;
    line-height: 1.65;
}

.rustud-blog-card__more {
    margin-top: auto;
    color: var(--rustud-blog-accent-dark);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.rustud-blog-card__more::after {
    content: " →";
}

.rustud-blog-pagination {
    display: flex;
    margin-top: 34px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.rustud-blog-pagination a {
    display: inline-flex;
    min-width: 42px;
    min-height: 42px;
    padding: 0 13px;
    align-items: center;
    justify-content: center;
    color: var(--rustud-blog-ink);
    text-decoration: none;
    background: #ffffff;
    border: 1px solid var(--rustud-blog-line);
    border-radius: 9px;
}

.rustud-blog-pagination a[aria-current="page"] {
    color: #ffffff;
    background: var(--rustud-blog-accent-dark);
    border-color: var(--rustud-blog-accent-dark);
}

.rustud-blog-breadcrumbs {
    display: flex;
    margin-bottom: 26px;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #aebed1;
    font-size: 13px;
    line-height: 1.5;
}

.rustud-blog-breadcrumbs a {
    color: #d7e1ee;
    text-decoration: none;
}

.rustud-blog-breadcrumbs a:hover,
.rustud-blog-breadcrumbs a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.rustud-blog-article__header {
    padding: 46px 0 52px;
    color: #ffffff;
    background: var(--rustud-blog-navy);
    border-bottom: 1px solid #203a57;
}

.rustud-blog-article__header-inner {
    width: min(920px, calc(100% - 40px));
    margin: 0 auto;
}

.rustud-blog-article__category {
    display: inline-block;
    margin-bottom: 16px;
    color: #83a8ff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.rustud-blog-article__lead {
    max-width: 800px;
    margin: 24px 0 0;
    color: #cad7e6;
    font-size: 18px;
    line-height: 1.65;
}

.rustud-blog-article__meta {
    display: flex;
    margin-top: 26px;
    flex-wrap: wrap;
    gap: 10px 24px;
    color: #aebed1;
    font-size: 14px;
}

.rustud-blog-article__meta strong {
    color: #ffffff;
}

.rustud-blog-article__layout {
    display: grid;
    grid-template-columns: minmax(0, 780px) minmax(250px, 1fr);
    gap: 36px;
    padding-top: 50px;
    padding-bottom: 20px;
    align-items: start;
}

.rustud-blog-article__content {
    min-width: 0;
    padding: 38px 42px;
    color: #17273d;
    background: #ffffff;
    border: 1px solid var(--rustud-blog-line);
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(21, 43, 70, .06);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.78;
}

.rustud-blog-article__content > :first-child {
    margin-top: 0;
}

.rustud-blog-article__content > :last-child {
    margin-bottom: 0;
}

.rustud-blog-article__content h2,
.rustud-blog-article__content h3,
.rustud-blog-article__content h4 {
    color: var(--rustud-blog-ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.25;
    letter-spacing: -.02em;
}

.rustud-blog-article__content h2 {
    margin: 42px 0 18px;
    font-size: 30px;
}

.rustud-blog-article__content h3 {
    margin: 32px 0 14px;
    font-size: 24px;
}

.rustud-blog-article__content h4 {
    margin: 26px 0 12px;
    font-size: 20px;
}

.rustud-blog-article__content p,
.rustud-blog-article__content ul,
.rustud-blog-article__content ol,
.rustud-blog-article__content blockquote,
.rustud-blog-article__content table,
.rustud-blog-article__content pre,
.rustud-blog-article__content figure {
    margin: 0 0 22px;
}

.rustud-blog-article__content ul,
.rustud-blog-article__content ol {
    padding-left: 28px;
}

.rustud-blog-article__content li + li {
    margin-top: 9px;
}

.rustud-blog-article__content a {
    color: var(--rustud-blog-accent-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.rustud-blog-article__content blockquote {
    padding: 18px 22px;
    color: #30445f;
    background: #f3f6fa;
    border-left: 4px solid var(--rustud-blog-accent);
}

.rustud-blog-article__content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 26px auto;
    border-radius: 10px;
}

.rustud-blog-article__content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
}

.rustud-blog-article__content th,
.rustud-blog-article__content td {
    padding: 10px 12px;
    border: 1px solid var(--rustud-blog-line);
    text-align: left;
}

.rustud-blog-article__content pre {
    max-width: 100%;
    padding: 18px;
    overflow-x: auto;
    background: #f3f6fa;
    border-radius: 8px;
    font-size: 14px;
}

.rustud-blog-article__aside {
    position: sticky;
    top: 104px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--rustud-blog-line);
    border-radius: 14px;
}

.rustud-blog-article__aside > strong {
    display: block;
    font-size: 20px;
}

.rustud-blog-article__aside p {
    margin: 12px 0 18px;
    color: var(--rustud-blog-muted);
    font-size: 14px;
    line-height: 1.6;
}

.rustud-blog-article__aside a {
    display: inline-block;
    color: var(--rustud-blog-accent-dark);
    font-weight: 700;
    text-underline-offset: 3px;
}

.rustud-blog-article__aside button,
.rustud-blog-cta button {
    min-height: 46px;
    padding: 0 20px;
    color: #ffffff;
    background: var(--rustud-blog-accent-dark);
    border: 1px solid var(--rustud-blog-accent-dark);
    border-radius: 9px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.rustud-blog-article__aside button {
    width: 100%;
    margin-top: 22px;
}

.rustud-blog-article__aside button:hover,
.rustud-blog-cta button:hover {
    background: #163f9e;
    border-color: #163f9e;
}

.rustud-blog-cta {
    display: flex;
    margin-top: 6px;
    margin-bottom: 72px;
    padding: 34px 38px;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: #ffffff;
    border: 1px solid var(--rustud-blog-line);
    border-radius: 14px;
}

.rustud-blog-cta h2 {
    max-width: 760px;
    font-size: clamp(24px, 3vw, 34px);
}

.rustud-blog-cta p {
    margin: 12px 0 0;
    color: var(--rustud-blog-muted);
    line-height: 1.6;
}

.rustud-blog-cta button {
    flex: 0 0 auto;
}

.rustud-blog-page a:focus-visible,
.rustud-blog-page button:focus-visible {
    outline: 3px solid #f6b84a;
    outline-offset: 3px;
}

@media (max-width: 980px) {
    .rustud-blog-grid,
    .rustud-blog-grid--related {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rustud-blog-article__layout {
        grid-template-columns: 1fr;
    }

    .rustud-blog-article__aside {
        position: static;
    }
}

@media (max-width: 760px) {
    .rustud-blog-shell,
    .rustud-blog-article__header-inner {
        width: min(100% - 28px, 1180px);
    }

    .rustud-blog-hero {
        padding-top: 52px;
        padding-bottom: 42px;
    }

    .rustud-blog-hero--compact,
    .rustud-blog-article__header {
        padding-top: 34px;
        padding-bottom: 38px;
    }

    .rustud-blog-hero h1,
    .rustud-blog-article__header h1 {
        font-size: clamp(34px, 11vw, 48px);
    }

    .rustud-blog-categories {
        grid-template-columns: 1fr;
    }

    .rustud-blog-section {
        padding-top: 46px;
        padding-bottom: 52px;
    }

    .rustud-blog-section__head,
    .rustud-blog-cta {
        align-items: stretch;
        flex-direction: column;
    }

    .rustud-blog-grid,
    .rustud-blog-grid--related {
        grid-template-columns: 1fr;
    }

    .rustud-blog-card,
    .rustud-blog-card--compact {
        min-height: 0;
    }

    .rustud-blog-article__layout {
        padding-top: 28px;
    }

    .rustud-blog-article__content {
        padding: 26px 20px;
        font-size: 17px;
        line-height: 1.72;
    }

    .rustud-blog-article__content h2 {
        font-size: 25px;
    }

    .rustud-blog-article__content h3 {
        font-size: 21px;
    }

    .rustud-blog-cta {
        margin-bottom: 54px;
        padding: 26px 22px;
    }

    .rustud-blog-cta button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
