:root {
    --article-bg: #0b0e13;
    --article-bg-soft: #11161d;
    --article-surface: #151b23;
    --article-surface-2: #1a222c;
    --article-border: rgba(255, 255, 255, 0.09);
    --article-border-strong: rgba(255, 255, 255, 0.16);
    --article-text: #f5f7fa;
    --article-muted: #a8b2c1;
    --article-muted-2: #788597;
    --article-accent: #25ca7f;
    --article-accent-soft: rgba(37, 202, 127, 0.12);
    --article-accent-glow: rgba(37, 202, 127, 0.28);
    --article-warning: #f59e0b;
    --article-danger: #f87171;
    --article-radius-xl: 28px;
    --article-radius-lg: 22px;
    --article-radius-md: 16px;
    --article-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 105px;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--article-text);
    background:
        radial-gradient(circle at 8% 4%, rgba(37, 202, 127, 0.07), transparent 28%),
        radial-gradient(circle at 90% 22%, rgba(34, 211, 238, 0.045), transparent 24%),
        var(--article-bg);
    font-family: "primary-font", Tahoma, Arial, sans-serif;
    line-height: 1.9;
    text-align: right;
    -webkit-font-smoothing: antialiased;
}

body.lightbox-open {
    overflow: hidden;
}

button,
a,
input,
textarea,
select {
    font-family: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

a,
button {
    -webkit-tap-highlight-color: transparent;
}

img,
video,
iframe {
    max-width: 100%;
}

button {
    border: 0;
}

.article-shell {
    width: min(1240px, calc(100% - 40px));
    margin-inline: auto;
}

.reading-progress {
    position: fixed;
    z-index: 1000;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
}

.reading-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #25ca7f, #56e39f);
    box-shadow: 0 0 16px var(--article-accent-glow);
    transition: width 0.08s linear;
}

.article-topbar {
    position: sticky;
    z-index: 100;
    top: 0;
    border-bottom: 1px solid var(--article-border);
    background: rgba(11, 14, 19, 0.84);
    backdrop-filter: blur(18px);
}

.article-topbar__inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.article-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.article-brand__mark {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(37, 202, 127, 0.3);
    border-radius: 14px;
    color: #08120d;
    background: linear-gradient(135deg, #25ca7f, #70e6ad);
    box-shadow: 0 12px 30px rgba(37, 202, 127, 0.18);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.article-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.45;
}

.article-brand__text strong {
    font-size: 0.95rem;
    font-weight: 800;
}

.article-brand__text small {
    color: var(--article-muted-2);
    font-size: 0.7rem;
}

.article-topbar__nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-topbar__nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid var(--article-border);
    border-radius: 13px;
    color: var(--article-muted);
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.8rem;
    font-weight: 700;
    transition: 0.2s ease;
}

.article-topbar__nav a:hover {
    color: var(--article-text);
    border-color: rgba(37, 202, 127, 0.3);
    background: var(--article-accent-soft);
    transform: translateY(-1px);
}

.article-hero {
    position: relative;
    overflow: hidden;
    padding: 68px 0 52px;
    border-bottom: 1px solid var(--article-border);
}

.article-hero::before {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    top: -260px;
    right: -120px;
    border-radius: 50%;
    background: rgba(37, 202, 127, 0.09);
    filter: blur(2px);
    pointer-events: none;
}

.article-hero__grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
    align-items: center;
    gap: 56px;
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    color: var(--article-muted-2);
    font-size: 0.74rem;
}

.article-breadcrumb a:hover {
    color: var(--article-accent);
}

.article-breadcrumb i {
    font-size: 0.6rem;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    margin-bottom: 14px;
    border: 1px solid rgba(37, 202, 127, 0.24);
    border-radius: 999px;
    color: var(--article-accent);
    background: var(--article-accent-soft);
    font-size: 0.75rem;
    font-weight: 800;
}

.article-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.65rem);
    line-height: 1.55;
    letter-spacing: -0.035em;
    font-weight: 900;
}

.article-lead {
    max-width: 740px;
    margin: 22px 0 0;
    color: var(--article-muted);
    font-size: clamp(0.92rem, 1.7vw, 1.08rem);
    line-height: 2.15;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 10px 18px;
    flex-wrap: wrap;
    margin-top: 26px;
    color: var(--article-muted-2);
    font-size: 0.76rem;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.article-meta i {
    color: var(--article-accent);
}

.article-cover {
    position: relative;
    isolation: isolate;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--article-border-strong);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.035);
    box-shadow: var(--article-shadow);
    transform: rotate(-1.2deg);
}

.article-cover img {
    position: relative;
    z-index: 2;
    width: 100%;
    aspect-ratio: 16 / 10;
    display: block;
    object-fit: cover;
    border-radius: 22px;
}

.article-cover__glow {
    position: absolute;
    z-index: 1;
    inset: 12% 10% -8%;
    border-radius: 50%;
    background: rgba(37, 202, 127, 0.22);
    filter: blur(52px);
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 305px;
    align-items: start;
    gap: 34px;
    padding-top: 54px;
    padding-bottom: 70px;
}

.article-main {
    min-width: 0;
}

.article-sidebar {
    position: sticky;
    top: 103px;
    display: grid;
    gap: 16px;
}

.sidebar-card {
    overflow: hidden;
    padding: 20px;
    border: 1px solid var(--article-border);
    border-radius: var(--article-radius-lg);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.15);
}

.sidebar-card__title {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-bottom: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--article-border);
}

.sidebar-card__title > span {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: var(--article-accent);
    background: var(--article-accent-soft);
}

.sidebar-card__title div {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

.sidebar-card__title strong {
    font-size: 0.88rem;
}

.sidebar-card__title small {
    color: var(--article-muted-2);
    font-size: 0.68rem;
}

.sidebar-toc nav {
    max-height: calc(100vh - 280px);
    overflow: auto;
    scrollbar-width: thin;
}

.sidebar-toc nav a {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 8px;
    border-radius: 10px;
    color: var(--article-muted);
    font-size: 0.75rem;
    line-height: 1.75;
    transition: 0.18s ease;
}

.sidebar-toc nav a span {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    margin-top: 8px;
    border-radius: 50%;
    background: var(--article-muted-2);
    transition: 0.18s ease;
}

.sidebar-toc nav a:hover,
.sidebar-toc nav a.is-active {
    color: var(--article-text);
    background: var(--article-accent-soft);
}

.sidebar-toc nav a:hover span,
.sidebar-toc nav a.is-active span {
    background: var(--article-accent);
    box-shadow: 0 0 0 4px rgba(37, 202, 127, 0.1);
}

.sidebar-toc nav a.toc-level-3 {
    padding-right: 24px;
    color: var(--article-muted-2);
    font-size: 0.7rem;
}

.author-card {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 13px;
}

.author-card__avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(37, 202, 127, 0.28);
    border-radius: 18px;
    color: #08120d;
    background: linear-gradient(135deg, #25ca7f, #6ce2a7);
    font-weight: 900;
}

.author-card > div:last-child {
    min-width: 0;
}

.author-card span {
    display: block;
    color: var(--article-muted-2);
    font-size: 0.68rem;
}

.author-card strong {
    display: block;
    margin-top: 1px;
    font-size: 0.92rem;
}

.author-card p {
    margin: 8px 0 10px;
    color: var(--article-muted);
    font-size: 0.7rem;
    line-height: 1.8;
}

.author-card a,
.sidebar-cta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--article-accent);
    font-size: 0.72rem;
    font-weight: 800;
}

.sidebar-cta {
    position: relative;
    padding: 24px;
    border-color: rgba(37, 202, 127, 0.2);
    background:
        radial-gradient(circle at 0 0, rgba(37, 202, 127, 0.15), transparent 42%),
        var(--article-surface);
}

.sidebar-cta__icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 15px;
    color: var(--article-accent);
    background: var(--article-accent-soft);
    font-size: 1.1rem;
}

.sidebar-cta strong {
    display: block;
    font-size: 0.9rem;
    line-height: 1.8;
}

.sidebar-cta p {
    margin: 10px 0 14px;
    color: var(--article-muted);
    font-size: 0.72rem;
    line-height: 1.9;
}

.mobile-toc {
    display: none;
    margin-bottom: 28px;
    border: 1px solid var(--article-border);
    border-radius: var(--article-radius-md);
    background: var(--article-surface);
}

.mobile-toc summary {
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 17px;
    cursor: pointer;
    list-style: none;
    font-size: 0.83rem;
    font-weight: 800;
}

.mobile-toc summary::-webkit-details-marker {
    display: none;
}

.mobile-toc summary span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.mobile-toc summary span i {
    color: var(--article-accent);
}

.mobile-toc[open] summary > i {
    transform: rotate(180deg);
}

.mobile-toc nav {
    display: grid;
    gap: 2px;
    padding: 0 12px 14px;
}

.mobile-toc nav a {
    padding: 8px 10px;
    border-radius: 9px;
    color: var(--article-muted);
    font-size: 0.75rem;
}

.mobile-toc nav a.toc-level-3 {
    padding-right: 25px;
    color: var(--article-muted-2);
}

.content-block {
    position: relative;
    width: 100%;
    margin: 0 auto 30px;
    scroll-margin-top: 108px;
}

.content-width--normal {
    max-width: 790px;
}

.content-width--wide {
    max-width: 960px;
}

.content-width--full {
    max-width: none;
}

.article-rich-text {
    color: #d5dbe4;
    font-size: 1rem;
    line-height: 2.22;
}

.article-rich-text p {
    margin: 0 0 1.35em;
}

.article-rich-text p:last-child {
    margin-bottom: 0;
}

.article-rich-text a {
    color: var(--article-accent);
    border-bottom: 1px dashed rgba(37, 202, 127, 0.5);
}

.article-rich-text strong,
.article-rich-text b {
    color: #ffffff;
    font-weight: 800;
}

.article-heading {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.article-heading--h2 {
    padding-top: 24px;
    margin-bottom: 18px;
}

.article-heading--h2 > span {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(37, 202, 127, 0.25);
    border-radius: 13px;
    color: var(--article-accent);
    background: var(--article-accent-soft);
    font-size: 0.72rem;
    font-weight: 900;
}

.article-heading h2 {
    margin: -2px 0 0;
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    line-height: 1.75;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.article-heading--h3 {
    align-items: center;
    margin: 34px 0 14px;
}

.article-heading--h3 > span {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border: 3px solid var(--article-accent);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(37, 202, 127, 0.08);
}

.article-heading h3 {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.42rem);
    line-height: 1.8;
    font-weight: 850;
}

.article-heading-description {
    padding-right: 57px;
    color: var(--article-muted);
    font-size: 0.92rem;
}

.article-media-card {
    overflow: hidden;
    margin: 0;
    padding: 9px;
    border: 1px solid var(--article-border);
    border-radius: var(--article-radius-xl);
    background: var(--article-surface);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.18);
}

.article-image-button {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: block;
    padding: 0;
    border-radius: 20px;
    background: transparent;
    cursor: zoom-in;
}

.article-image-button img {
    width: 100%;
    max-height: 720px;
    display: block;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.article-image-button:hover img {
    transform: scale(1.015);
    filter: brightness(0.84);
}

.article-image-zoom {
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #fff;
    background: rgba(10, 13, 17, 0.72);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(8px);
    font-size: 0.72rem;
    font-weight: 700;
    transition: 0.22s ease;
}

.article-image-button:hover .article-image-zoom {
    opacity: 1;
    transform: translateY(0);
}

.article-media-card figcaption {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
    padding: 13px 12px 4px;
    color: var(--article-muted-2);
    font-size: 0.72rem;
    line-height: 1.75;
    text-align: center;
}

.article-media-card figcaption i {
    margin-top: 5px;
    color: var(--article-accent);
}

.article-video-frame {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    background: #05070a;
}

.article-video-frame video,
.article-video-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    object-fit: contain;
}

.article-quote {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 30px 34px 27px;
    border: 1px solid rgba(37, 202, 127, 0.22);
    border-right: 4px solid var(--article-accent);
    border-radius: var(--article-radius-lg);
    color: #e4e8ee;
    background:
        radial-gradient(circle at 10% 15%, rgba(37, 202, 127, 0.12), transparent 38%),
        var(--article-surface);
    font-size: 1.03rem;
    line-height: 2.1;
}

.article-quote > i {
    position: absolute;
    left: 26px;
    top: 20px;
    color: rgba(37, 202, 127, 0.13);
    font-size: 3.3rem;
}

.article-quote p {
    margin: 0 0 12px;
}

.article-quote cite {
    display: block;
    color: var(--article-accent);
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 800;
}

.article-callout {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 15px;
    padding: 22px;
    border: 1px solid;
    border-radius: var(--article-radius-lg);
}

.article-callout__icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 1.15rem;
}

.article-callout strong {
    display: block;
    margin: 0 0 5px;
    font-size: 0.92rem;
}

.article-callout p {
    margin: 0 0 8px;
    color: var(--article-muted);
    font-size: 0.84rem;
    line-height: 2;
}

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

.article-callout--note {
    border-color: rgba(37, 202, 127, 0.22);
    background: rgba(37, 202, 127, 0.065);
}

.article-callout--note .article-callout__icon {
    color: var(--article-accent);
    background: rgba(37, 202, 127, 0.13);
}

.article-callout--warning {
    border-color: rgba(245, 158, 11, 0.24);
    background: rgba(245, 158, 11, 0.065);
}

.article-callout--warning .article-callout__icon {
    color: var(--article-warning);
    background: rgba(245, 158, 11, 0.13);
}

.article-code-card {
    overflow: hidden;
    border: 1px solid var(--article-border-strong);
    border-radius: var(--article-radius-lg);
    background: #080b10;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.2);
}

.article-code-toolbar {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 15px;
    border-bottom: 1px solid var(--article-border);
    background: #11161d;
}

.article-code-toolbar span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--article-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.article-code-toolbar span i {
    color: var(--article-accent);
}

.article-code-toolbar button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid var(--article-border);
    border-radius: 9px;
    color: var(--article-muted);
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
    font-size: 0.68rem;
    transition: 0.18s ease;
}

.article-code-toolbar button:hover,
.article-code-toolbar button.is-copied {
    color: var(--article-accent);
    border-color: rgba(37, 202, 127, 0.25);
    background: var(--article-accent-soft);
}

.article-code-card pre {
    max-height: 650px;
    overflow: auto;
    margin: 0;
    padding: 22px;
    direction: ltr;
    text-align: left;
    scrollbar-width: thin;
}

.article-code-card code {
    color: #d8e0ea;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 0.84rem;
    line-height: 1.8;
    white-space: pre;
    tab-size: 4;
}

.article-list-card {
    padding: 24px;
    border: 1px solid var(--article-border);
    border-radius: var(--article-radius-lg);
    background: var(--article-surface);
}

.article-list-card h3 {
    margin: 0 0 16px;
    font-size: 1rem;
}

.article-list-card ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-list-card li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 12px 13px;
    border: 1px solid var(--article-border);
    border-radius: 13px;
    color: #d5dbe4;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.84rem;
    line-height: 1.85;
}

.article-list-card li i {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    display: grid;
    place-items: center;
    margin-top: 2px;
    border-radius: 8px;
    color: var(--article-accent);
    background: var(--article-accent-soft);
    font-size: 0.62rem;
}

.article-project-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
    border: 1px solid rgba(37, 202, 127, 0.22);
    border-radius: var(--article-radius-xl);
    background:
        radial-gradient(circle at 100% 0, rgba(37, 202, 127, 0.1), transparent 36%),
        var(--article-surface);
    box-shadow: var(--article-shadow);
}

.article-project-card__media {
    min-height: 330px;
    padding: 12px;
}

.article-project-card__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 19px;
}

.article-project-card__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 34px;
}

.article-project-card__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--article-accent);
    background: var(--article-accent-soft);
    font-size: 0.7rem;
    font-weight: 800;
}

.article-project-card h2 {
    margin: 14px 0 10px;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    line-height: 1.65;
    font-weight: 900;
}

.article-project-card__content > div {
    color: var(--article-muted);
    font-size: 0.86rem;
    line-height: 2;
}

.article-project-card__content p {
    margin: 0 0 11px;
}

.article-project-card__content > a,
.article-action-block > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 18px;
    margin-top: 15px;
    border-radius: 13px;
    color: #07120c;
    background: linear-gradient(135deg, #25ca7f, #6fe3aa);
    box-shadow: 0 12px 30px rgba(37, 202, 127, 0.16);
    font-size: 0.78rem;
    font-weight: 900;
    transition: 0.18s ease;
}

.article-project-card__content > a:hover,
.article-action-block > a:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(37, 202, 127, 0.22);
}

.article-action-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 27px;
    border: 1px dashed rgba(37, 202, 127, 0.35);
    border-radius: var(--article-radius-lg);
    background: rgba(37, 202, 127, 0.045);
    text-align: center;
}

.article-action-block > a {
    margin-top: 0;
}

.article-action-block p {
    margin: 12px 0 0;
    color: var(--article-muted);
    font-size: 0.75rem;
}

.article-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0;
}

.article-divider span {
    width: min(160px, 28%);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--article-border-strong));
}

.article-divider span:last-child {
    transform: rotate(180deg);
}

.article-divider i {
    width: 8px;
    height: 8px;
    border: 2px solid var(--article-accent);
    border-radius: 50%;
}

.article-share-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 23px;
    margin-top: 48px;
    border: 1px solid var(--article-border);
    border-radius: var(--article-radius-lg);
    background: var(--article-surface);
}

.article-share-panel > div:first-child {
    display: flex;
    align-items: center;
    gap: 13px;
}

.article-share-panel__icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: var(--article-accent);
    background: var(--article-accent-soft);
}

.article-share-panel strong {
    display: block;
    font-size: 0.9rem;
}

.article-share-panel p {
    margin: 2px 0 0;
    color: var(--article-muted-2);
    font-size: 0.72rem;
}

.article-share-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.article-share-actions button {
    min-height: 41px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid var(--article-border);
    border-radius: 12px;
    color: var(--article-muted);
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    transition: 0.18s ease;
}

.article-share-actions button:hover {
    color: var(--article-text);
    border-color: rgba(37, 202, 127, 0.28);
    background: var(--article-accent-soft);
}

.article-pagination {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    margin-top: 17px;
}

.article-pagination a {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 19px;
    border: 1px solid var(--article-border);
    border-radius: var(--article-radius-lg);
    background: rgba(255, 255, 255, 0.022);
    transition: 0.2s ease;
}

.article-pagination a:hover {
    border-color: rgba(37, 202, 127, 0.25);
    background: var(--article-accent-soft);
    transform: translateY(-2px);
}

.article-pagination a > span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--article-accent);
    font-size: 0.68rem;
    font-weight: 800;
}

.article-pagination a strong {
    display: block;
    margin-top: 7px;
    font-size: 0.82rem;
    line-height: 1.75;
}

.related-section {
    padding: 68px 0 80px;
    border-top: 1px solid var(--article-border);
    background: rgba(255, 255, 255, 0.018);
}

.related-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 27px;
}

.related-section__header span {
    color: var(--article-accent);
    font-size: 0.73rem;
    font-weight: 800;
}

.related-section__header h2 {
    margin: 4px 0 0;
    font-size: clamp(1.55rem, 3vw, 2.3rem);
    font-weight: 900;
}

.related-section__header > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--article-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.related-section__header > a:hover {
    color: var(--article-accent);
}

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

.related-card {
    overflow: hidden;
    border: 1px solid var(--article-border);
    border-radius: var(--article-radius-lg);
    background: var(--article-surface);
    transition: 0.22s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 202, 127, 0.24);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.2);
}

.related-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    display: block;
}

.related-card__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.related-card:hover .related-card__image img {
    transform: scale(1.04);
}

.related-card__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 10, 14, 0.65), transparent 56%);
}

.related-card__image > span {
    position: absolute;
    z-index: 2;
    right: 14px;
    bottom: 13px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--article-accent);
    background: rgba(7, 12, 10, 0.74);
    backdrop-filter: blur(8px);
    font-size: 0.66rem;
    font-weight: 800;
}

.related-card__content {
    padding: 18px;
}

.related-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--article-muted-2);
    font-size: 0.64rem;
}

.related-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.related-card__meta i {
    color: var(--article-accent);
}

.related-card h3 {
    margin: 12px 0 8px;
    font-size: 0.95rem;
    line-height: 1.85;
    font-weight: 850;
}

.related-card h3 a:hover {
    color: var(--article-accent);
}

.related-card p {
    min-height: 52px;
    margin: 0;
    color: var(--article-muted);
    font-size: 0.72rem;
    line-height: 1.8;
}

.related-card__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 13px;
    color: var(--article-accent);
    font-size: 0.7rem;
    font-weight: 800;
}

.article-footer {
    border-top: 1px solid var(--article-border);
    background: #080b0f;
}

.article-footer .article-shell {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.article-footer p {
    margin: 0;
    color: var(--article-muted-2);
    font-size: 0.7rem;
}

.article-footer div {
    display: flex;
    gap: 14px;
}

.article-footer a {
    color: var(--article-muted);
    font-size: 0.7rem;
}

.article-footer a:hover {
    color: var(--article-accent);
}

.image-lightbox {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 40px;
    background: rgba(3, 5, 8, 0.94);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: 0.22s ease;
}

.image-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.image-lightbox figure {
    max-width: min(1200px, 94vw);
    max-height: 88vh;
    margin: 0;
    text-align: center;
}

.image-lightbox img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.image-lightbox figcaption {
    margin-top: 12px;
    color: var(--article-muted);
    font-size: 0.76rem;
}

.image-lightbox__close {
    position: absolute;
    top: 22px;
    left: 24px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    cursor: pointer;
    font-size: 1rem;
}

.article-toast {
    position: fixed;
    z-index: 1300;
    right: 50%;
    bottom: 25px;
    padding: 10px 15px;
    border: 1px solid rgba(37, 202, 127, 0.28);
    border-radius: 12px;
    color: #dffbed;
    background: rgba(12, 27, 20, 0.94);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translate(50%, 12px);
    font-size: 0.74rem;
    transition: 0.2s ease;
}

.article-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(50%, 0);
}

@media (max-width: 1100px) {
    .article-hero__grid {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
        gap: 36px;
    }

    .article-layout {
        grid-template-columns: minmax(0, 1fr) 270px;
        gap: 24px;
    }

    .article-project-card {
        grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
    }
}

@media (max-width: 920px) {
    .article-hero {
        padding-top: 48px;
    }

    .article-hero__grid {
        grid-template-columns: 1fr;
    }

    .article-cover {
        max-width: 700px;
        width: 100%;
        margin-inline: auto;
        transform: none;
    }

    .article-layout {
        display: block;
        padding-top: 38px;
    }

    .article-sidebar {
        display: none;
    }

    .mobile-toc {
        display: block;
    }

    .content-width--normal,
    .content-width--wide,
    .content-width--full {
        max-width: 100%;
    }

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

@media (max-width: 700px) {
    .article-shell {
        width: min(100% - 26px, 1240px);
    }

    .article-topbar__inner {
        min-height: 68px;
    }

    .article-brand__text small,
    .article-topbar__nav a span {
        display: none;
    }

    .article-topbar__nav a {
        width: 40px;
        min-height: 40px;
        justify-content: center;
        padding: 0;
    }

    .article-topbar__nav a {
        font-size: 0;
    }

    .article-topbar__nav a i {
        font-size: 0.85rem;
    }

    .article-hero {
        padding: 34px 0 32px;
    }

    .article-breadcrumb {
        margin-bottom: 16px;
    }

    .article-hero h1 {
        font-size: clamp(1.7rem, 7vw, 2.35rem);
        line-height: 1.6;
    }

    .article-lead {
        margin-top: 15px;
        font-size: 0.87rem;
    }

    .article-meta {
        margin-top: 19px;
        gap: 8px 13px;
        font-size: 0.67rem;
    }

    .article-cover {
        padding: 7px;
        border-radius: 22px;
    }

    .article-cover img {
        border-radius: 17px;
    }

    .article-layout {
        padding-bottom: 52px;
    }

    .content-block {
        margin-bottom: 23px;
    }

    .article-rich-text {
        font-size: 0.91rem;
        line-height: 2.1;
    }

    .article-heading--h2 {
        gap: 11px;
        padding-top: 15px;
    }

    .article-heading--h2 > span {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 11px;
        font-size: 0.64rem;
    }

    .article-heading h2 {
        font-size: 1.3rem;
    }

    .article-heading-description {
        padding-right: 0;
    }

    .article-media-card {
        padding: 6px;
        border-radius: 20px;
    }

    .article-image-button,
    .article-image-button img,
    .article-video-frame {
        border-radius: 15px;
    }

    .article-image-zoom {
        display: none;
    }

    .article-quote {
        padding: 25px 22px 21px;
        font-size: 0.92rem;
    }

    .article-callout {
        grid-template-columns: 42px 1fr;
        gap: 11px;
        padding: 17px;
    }

    .article-callout__icon {
        width: 42px;
        height: 42px;
        border-radius: 13px;
        font-size: 0.95rem;
    }

    .article-code-card pre {
        padding: 17px;
    }

    .article-code-card code {
        font-size: 0.76rem;
    }

    .article-list-card {
        padding: 17px;
    }

    .article-project-card {
        grid-template-columns: 1fr;
    }

    .article-project-card__media {
        min-height: 240px;
    }

    .article-project-card__content {
        padding: 24px;
    }

    .article-share-panel {
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
    }

    .article-share-actions button {
        flex: 1;
        justify-content: center;
    }

    .article-pagination {
        grid-template-columns: 1fr;
    }

    .related-section {
        padding: 50px 0 58px;
    }

    .related-section__header {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .article-footer .article-shell {
        min-height: 86px;
        align-items: flex-start;
        justify-content: center;
        flex-direction: column;
        padding-block: 18px;
    }

    .image-lightbox {
        padding: 18px;
    }
}

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


/* =========================================================
   Final corrections: featured image size and Persian text alignment
   ========================================================= */

.article-hero__grid {
    grid-template-columns:
        minmax(0, 0.95fr)
        minmax(520px, 1.15fr);
    gap: 48px;
}

.article-cover {
    width: 100%;
    transform: none;
}

.article-cover img {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
}

.article-lead,
.article-rich-text,
.article-rich-text p,
.article-heading-description {
    direction: rtl;
    text-align: justify;
    text-align-last: right;
    text-justify: inter-word;
}

@media (max-width: 1100px) {
    .article-hero__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .article-hero__content {
        width: 100%;
        max-width: none;
    }

    .article-cover {
        width: 100%;
        max-width: 1000px;
        margin-inline: auto;
    }
}
