:root {
    --article-bg: #fffaf2;
    --article-surface: #ffffff;
    --article-primary: #7c2d12;
    --article-primary-dark: #5a1f0d;
    --article-accent: #b45309;
    --article-text: #2f241f;
    --article-muted: #6f625b;
    --article-border: #ead8bd;
    --article-note: #fff5dc;
    --article-info: #edf8f3;
    --article-danger: #fff0ed;
    --article-width: 920px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.article-body {
    margin: 0;
    color: var(--article-text);
    background: var(--article-bg);
    font-family: "Noto Serif Bengali", "Noto Sans Bengali", "SolaimanLipi", serif;
    font-size: 18px;
    line-height: 1.78;
}

.article-skip-link {
    position: absolute;
    top: -60px;
    left: 12px;
    z-index: 1000;
    padding: 8px 14px;
    color: #fff;
    background: var(--article-primary);
}

.article-skip-link:focus {
    top: 12px;
}

.article-site-header {
    color: #fff;
    background: linear-gradient(135deg, var(--article-primary-dark), var(--article-primary));
    border-bottom: 4px solid #d59b48;
}

.article-site-header-inner,
.article-main,
.article-footer-inner {
    width: min(calc(100% - 32px), var(--article-width));
    margin-inline: auto;
}

.article-site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
}

.article-brand {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    text-decoration: none;
}

.article-home-link {
    color: #fff4dd;
    text-decoration: none;
}

.article-main {
    padding: 28px 0 50px;
}

.article-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 18px;
    padding: 0;
    color: var(--article-muted);
    font-size: .9rem;
    list-style: none;
}

.article-breadcrumb li:not(:last-child)::after {
    margin-left: 6px;
    content: "›";
}

.article-breadcrumb a,
.article-content a,
.article-footer a {
    color: var(--article-primary);
    text-underline-offset: 3px;
}

.article-shell {
    overflow: hidden;
    background: var(--article-surface);
    border: 1px solid var(--article-border);
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(80, 45, 20, .09);
}

.article-hero {
    padding: clamp(26px, 5vw, 54px);
    background:
        radial-gradient(circle at 90% 10%, rgba(208, 151, 69, .18), transparent 36%),
        linear-gradient(180deg, #fffdf9, #fff7e8);
    border-bottom: 1px solid var(--article-border);
}

.article-kicker {
    margin: 0 0 8px;
    color: var(--article-accent);
    font-size: .86rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.article-title {
    max-width: 820px;
    margin: 0;
    color: var(--article-primary);
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.22;
}

.article-deck {
    max-width: 760px;
    margin: 18px 0 0;
    color: #56463e;
    font-size: 1.15rem;
    line-height: 1.65;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 22px;
    color: var(--article-muted);
    font-size: .88rem;
}

.article-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: clamp(22px, 5vw, 50px);
}

.article-toc {
    padding: 20px 24px;
    background: #fffaf0;
    border: 1px solid var(--article-border);
    border-radius: 12px;
}

.article-toc h2 {
    margin: 0 0 10px;
    color: var(--article-primary);
    font-size: 1.15rem;
}

.article-toc ol {
    margin: 0;
    padding-left: 24px;
}

.article-toc a {
    color: #56331f;
    text-decoration: none;
}

.article-toc a:hover,
.article-toc a:focus {
    color: var(--article-primary);
    text-decoration: underline;
}

.article-content h2,
.article-content h3 {
    scroll-margin-top: 24px;
    color: var(--article-primary);
    line-height: 1.35;
}

.article-content h2 {
    margin: 2.2em 0 .65em;
    padding-bottom: .32em;
    font-size: 1.65rem;
    border-bottom: 1px solid var(--article-border);
}

.article-content h3 {
    margin: 1.7em 0 .45em;
    font-size: 1.25rem;
}

.article-content p,
.article-content ul,
.article-content ol {
    margin-top: 0;
    margin-bottom: 1.15em;
}

.article-content strong {
    color: #4d210f;
}

.article-lead::first-letter {
    float: left;
    margin: .12em .1em 0 0;
    color: var(--article-primary);
    font-size: 3.35rem;
    font-weight: 700;
    line-height: .72;
}

.article-callout {
    margin: 1.5em 0;
    padding: 18px 20px;
    background: var(--article-note);
    border-left: 5px solid var(--article-accent);
    border-radius: 8px;
}

.article-callout.info {
    background: var(--article-info);
    border-left-color: #18856b;
}

.article-callout.warning {
    background: var(--article-danger);
    border-left-color: #b93825;
}

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

.article-rule-table-wrap {
    overflow-x: auto;
    margin: 1.5em 0;
    border: 1px solid var(--article-border);
    border-radius: 10px;
}

.article-rule-table {
    width: 100%;
    min-width: 660px;
    border-collapse: collapse;
    font-size: .95rem;
}

.article-rule-table th,
.article-rule-table td {
    padding: 12px 14px;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid var(--article-border);
}

.article-rule-table th {
    color: #fff;
    background: var(--article-primary);
}

.article-rule-table tbody tr:nth-child(even) {
    background: #fffaf2;
}

.article-rule-table tbody tr:last-child td {
    border-bottom: 0;
}

.article-formula {
    margin: 1.5em 0;
    padding: 16px;
    overflow-x: auto;
    color: #442617;
    background: #f8f1e5;
    border: 1px dashed #cda66c;
    border-radius: 9px;
    font-family: Georgia, "Times New Roman", serif;
    text-align: center;
}

.article-figure {
    margin: 1.8em 0;
}

.article-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--article-border);
    border-radius: 10px;
}

.article-figure figcaption {
    margin-top: 8px;
    color: var(--article-muted);
    font-size: .86rem;
    text-align: center;
}

.article-sources,
.article-tags {
    margin-top: 2.5em;
    padding-top: 1.4em;
    border-top: 1px solid var(--article-border);
}

.article-sources h2 {
    margin-top: 0;
}

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

.article-tag {
    padding: 4px 10px;
    color: #613215;
    background: #f8ead2;
    border-radius: 999px;
    font-size: .82rem;
}

.article-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0 clamp(22px, 5vw, 50px) clamp(22px, 5vw, 50px);
}

.article-nav a {
    display: block;
    padding: 16px;
    color: var(--article-primary);
    background: #fffaf2;
    border: 1px solid var(--article-border);
    border-radius: 10px;
    text-decoration: none;
}

.article-nav a:last-child {
    text-align: right;
}

.article-nav small {
    display: block;
    color: var(--article-muted);
}

.article-footer {
    padding: 26px 0;
    color: var(--article-muted);
    font-size: .86rem;
    text-align: center;
}

@media (max-width: 650px) {
    body.article-body {
        font-size: 17px;
    }

    .article-site-header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

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

    .article-nav a:last-child {
        text-align: left;
    }
}

@media print {
    body.article-body {
        color: #000;
        background: #fff;
        font-size: 12pt;
    }

    .article-site-header,
    .article-breadcrumb,
    .article-toc,
    .article-nav,
    .article-footer,
    .article-tags {
        display: none !important;
    }

    .article-main,
    .article-shell {
        width: 100%;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .article-hero,
    .article-body-grid {
        padding: 0;
        background: #fff;
        border: 0;
    }

    .article-content a {
        color: #000;
        text-decoration: none;
    }

    .article-content h2,
    .article-content h3,
    .article-rule-table,
    .article-callout {
        break-inside: avoid;
    }
}
