:root {
    --ink: #20302a;
    --ink-soft: #4a5850;
    --paper: #f7f2e6;
    --paper-raised: #fffdf7;
    --line: #e2d7b8;
    --green: #2e4a3b;
    --green-deep: #1c2f26;
    --gold: #a9822f;
    --gold-soft: #cdae6c;
    --max-w: 920px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Cairo", sans-serif;
    font-weight: 400;
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--gold-soft);
    color: var(--green-deep);
}

a {
    color: var(--green);
}

/* ---------- Ornamental top band ---------- */
.band {
    height: 10px;
    width: 100%;
    background:
        repeating-linear-gradient(135deg,
            var(--gold) 0 3px,
            transparent 3px 16px);
    opacity: .55;
}

/* ---------- Header ---------- */
.monhead {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 56px 24px 40px;
    text-align: center;
    position: relative;
}

.eyebrow {
    font-size: 14px;
    letter-spacing: .5px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 14px;
}

h1.title {
    font-family: "Amiri", serif;
    font-weight: 700;
    font-size: clamp(34px, 5.5vw, 52px);
    margin: 0 0 10px;
    color: var(--green-deep);
}

.subtitle {
    font-size: 16px;
    color: var(--ink-soft);
}

.meta-date {
    display: inline-block;
    margin-top: 18px;
    font-size: 13px;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    background: var(--paper-raised);
    padding: 6px 16px;
    border-radius: 100px;
}

.divider-orn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 30px auto 0;
    max-width: 280px;
    color: var(--gold);
}

.divider-orn::before,
.divider-orn::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--line);
}

.divider-orn svg {
    width: 22px;
    height: 22px;
}

/* ---------- Layout: content + TOC ---------- */
.layout {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 10px 24px 100px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

/* Table of contents */
.toc {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px 22px;
}

.toc summary {
    cursor: pointer;
    font-family: "Amiri", serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--green-deep);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.toc summary::after {
    content: "\2304";
    font-size: 16px;
    color: var(--gold);
    transition: transform .25s ease;
}

.toc[open] summary::after {
    transform: rotate(180deg);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}

@media (min-width:640px) {
    .toc-list {
        grid-template-columns: 1fr 1fr;
    }
}

.toc-list a {
    display: flex;
    align-items: baseline;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-size: 14.5px;
    padding: 7px 8px;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease;
}

.toc-list a:hover,
.toc-list a.active {
    background: #efe6c9;
    color: var(--green-deep);
}

.toc-num {
    font-family: "Amiri", serif;
    color: var(--gold);
    font-weight: 700;
    min-width: 18px;
}

/* ---------- Articles ---------- */
main {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

section.article {
    padding: 34px 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 24px;
}

section.article:last-of-type {
    border-bottom: none;
}

.article-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.medallion {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--paper-raised), var(--paper) 70%);
    border: 1.5px solid var(--gold-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Amiri", serif;
    font-weight: 700;
    font-size: 22px;
    color: var(--green-deep);
    position: relative;
}

.medallion::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 1px solid var(--line);
}

h2.article-title {
    font-family: "Amiri", serif;
    font-weight: 700;
    font-size: 22px;
    color: var(--green-deep);
    margin: 0;
}

.article-body p {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: 16px;
}

.article-body ul {
    margin: 8px 0 16px;
    padding-inline-start: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-body li {
    font-size: 15.5px;
    position: relative;
}

.article-body li::marker {
    color: var(--gold);
}

.intro-block p {
    font-size: 16.5px;
    color: var(--ink-soft);
}

/* Contact / closing */
.contact-card {
    margin-top: 10px;
    background: var(--green-deep);
    color: #f2ead4;
    border-radius: 18px;
    padding: 38px 32px;
    text-align: center;
}

.contact-card h2 {
    font-family: "Amiri", serif;
    font-size: 24px;
    margin: 0 0 10px;
    color: #fff;
}

.contact-card p {
    color: #d9d0b3;
    margin: 0 0 20px;
    font-size: 15.5px;
}

.contact-btn {
    display: inline-block;
    background: var(--gold);
    color: var(--green-deep);
    font-weight: 700;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 100px;
    font-size: 15px;
    transition: transform .15s ease, background .15s ease;
}

.contact-btn:hover {
    background: var(--gold-soft);
    transform: translateY(-1px);
}

footer {
    text-align: center;
    padding: 30px 24px 50px;
    font-size: 13px;
    color: var(--ink-soft);
}

/* Back to top */
.top-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--green-deep);
    color: #f2ead4;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(28, 47, 38, .28);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    font-size: 18px;
}

.top-btn.show {
    opacity: 1;
    pointer-events: auto;
}

.top-btn:hover {
    transform: translateY(-2px);
}

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

    * {
        transition: none !important;
    }
}

@media print {

    .toc,
    .top-btn,
    .band {
        display: none;
    }

    body {
        background: #fff;
    }
}
