@font-face {
    font-family: "Noto Kufi Arabic";
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url("../fonts/noto-kufi-arabic-arabic.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: "Noto Kufi Arabic";
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url("../fonts/noto-kufi-arabic-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --theme-header-height: 5.5rem;
}

.theme4 {
    --theme-primary: #7a1f35;
    --theme-primary-dark: #5a1527;
    --theme-primary-soft: #f8ebee;
    --theme-gold: #c5ac33;
    --theme-gold-bright: #e2c246;
    --theme-gold-dark: #a58d1f;
    --theme-gold-soft: #fbf8ea;
    --theme-gold-text: #7d6a12;
    --theme-link: #11a0d8;
    --theme-link-text: #0b7aa8;
    --theme-sand: #f5f3f0;
    --theme-border: #e4e0d8;
    --theme-ink: #2b0f17;
    --theme-ink-soft: #3d1822;
    --theme-terracotta: #c0623f;
    --theme-terracotta-soft: #f7e6df;
    --theme-text: #2b0f17;
    --theme-muted: #5f6b63;
    --theme-white: #fff;
    --theme-radius-lg: 2.25rem;
    --theme-radius-md: 1.5rem;
    --theme-radius-sm: 1rem;
    --theme-shadow: 0 1px 2px rgba(43, 15, 23, 0.06), 0 8px 24px rgba(43, 15, 23, 0.06);
    --theme-shadow-hover: 0 2px 4px rgba(43, 15, 23, 0.08), 0 18px 40px rgba(43, 15, 23, 0.12);
    --theme-heading-font: "Noto Kufi Arabic", system-ui, sans-serif;
    --theme-ease: cubic-bezier(0.22, 1, 0.36, 1);

    --bs-body-bg: var(--theme-sand);
    --bs-body-color: var(--theme-text);
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-body-line-height: 1.8;
    --bs-link-color-rgb: 11, 122, 168;
    --bs-link-hover-color-rgb: 31, 122, 58;
    --bs-border-color: var(--theme-border);

    background-color: var(--theme-sand);
    color: var(--theme-text);
    overflow-x: hidden;
}

.theme4 h1,
.theme4 h2,
.theme4 h3,
.theme4 h4,
.theme4 .navbar-nav {
    font-family: var(--theme-heading-font);
}

.theme4 a {
    text-decoration: none;
}

.theme4 img {
    max-width: 100%;
}

.theme4 :focus-visible {
    outline: 3px solid var(--theme-terracotta);
    outline-offset: 3px;
}

.theme-shell {
    width: 100%;
    max-width: 1360px;
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 768px) {
    .theme-shell {
        padding-inline: 1.5rem;
    }
}

.theme-star {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.theme-arrow {
    transform: rotate(45deg);
    transition: transform 0.35s var(--theme-ease);
}

[dir="ltr"] .theme-arrow {
    transform: rotate(135deg);
}

[dir="ltr"] .theme-rail-icon {
    transform: scaleX(-1);
}

/* Chips, pills, circles */

.theme-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.9rem;
    border: 1px solid var(--theme-border);
    border-radius: 999px;
    background: var(--theme-white);
    color: var(--theme-ink);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.6;
}

.theme-chip::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--theme-terracotta);
}

.theme-chip-soft {
    border-color: transparent;
    background: var(--theme-primary-soft);
    color: var(--theme-primary-dark);
    font-size: 0.75rem;
    padding: 0.2rem 0.75rem;
}

.theme-chip-soft::before {
    background: var(--theme-primary);
}

.theme-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.4rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--theme-heading-font);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.theme-pill-ink {
    background: var(--theme-ink);
    color: var(--theme-white);
}

.theme-pill-ghost {
    border-color: var(--theme-border);
    color: var(--theme-ink);
}

.theme-pill-ghost:hover {
    border-color: var(--theme-ink);
    color: var(--theme-ink);
}

.theme-circle-link {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--theme-border);
    border-radius: 50%;
    background: var(--theme-white);
    color: var(--theme-ink);
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.35s var(--theme-ease);
}

.theme-circle-ink {
    border-color: var(--theme-ink);
    background: var(--theme-ink);
    color: var(--theme-white);
}

button.theme-circle-link:hover,
a.theme-circle-link:hover {
    border-color: var(--theme-terracotta);
    background: var(--theme-terracotta);
    color: var(--theme-white);
}

.theme-pill-group {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.theme-pill-group:hover .theme-pill-ink,
.theme-pill-group:hover .theme-circle-ink {
    border-color: var(--theme-terracotta);
    background: var(--theme-terracotta);
}

.theme-pill-group:hover .theme-arrow {
    transform: rotate(0deg);
}

[dir="ltr"] .theme-pill-group:hover .theme-arrow {
    transform: rotate(180deg);
}

/* Header */

.theme-header {
    z-index: 1030;
    background: var(--theme-white);
    box-shadow: 0 1px 0 var(--theme-border);
    transition: box-shadow 0.3s ease;
}

.theme-header.scrolled {
    box-shadow: 0 8px 24px rgba(43, 15, 23, 0.1);
}

.theme-navbar {
    padding: 0;
}

.theme-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 1rem;
    padding-block: 0.75rem;
}

.theme-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    color: var(--theme-ink);
}

.theme-logo {
    max-height: 3rem;
    width: auto;
}

.theme-brand-mark {
    width: 2.25rem;
    height: 2.25rem;
    color: var(--theme-primary);
}

.theme-brand-name {
    font-family: var(--theme-heading-font);
    font-size: 1.1rem;
    font-weight: 700;
}

.theme-menu-toggler {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--theme-ink);
    color: var(--theme-white);
}

.theme-menu-toggler:focus {
    box-shadow: none;
}

.theme-subnav .nav-link {
    padding: 0.4rem 0.75rem !important;
    border-radius: 999px;
    color: var(--theme-ink);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.theme-subnav .nav-link:hover,
.theme-subnav .nav-link:focus,
.theme-subnav .nav-link.show {
    background: var(--theme-gold-soft);
    color: var(--theme-gold-text);
}

.theme-nav .nav-link {
    position: relative;
    padding: 0.85rem 1.1rem !important;
    color: var(--theme-ink);
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.theme-nav .nav-link::after {
    border-top-color: currentColor;
}

.theme-nav .nav-link:hover,
.theme-nav .nav-link:focus,
.theme-nav .nav-link.active,
.theme-nav .nav-link.show {
    color: var(--theme-primary);
}

.theme-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-header-actions .navbar-nav {
    margin: 0 !important;
}

.theme-header-actions .nav-link {
    padding: 0.5rem 0.85rem !important;
    border-radius: 999px;
    color: var(--theme-ink);
    font-size: 0.9rem;
    font-weight: 600;
}

.theme-header-actions .nav-link:hover {
    background: var(--theme-gold-soft);
}

.theme-user-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-auth-buttons {
    display: flex;
    gap: 0.4rem;
}

.theme-auth-buttons .theme-pill-ink:hover {
    background: var(--theme-terracotta);
    color: var(--theme-white);
}

.theme4 .dropdown-menu {
    min-width: 13rem;
    padding: 0.4rem;
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius-sm);
    box-shadow: var(--theme-shadow-hover);
    --bs-dropdown-link-color: var(--theme-ink);
    --bs-dropdown-link-hover-bg: var(--theme-gold-soft);
    --bs-dropdown-link-hover-color: var(--theme-ink);
    --bs-dropdown-link-active-bg: var(--theme-ink);
    --bs-dropdown-link-active-color: var(--theme-white);
}

.theme4 .dropdown-item {
    border-radius: 0.65rem;
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 600;
}

@media (min-width: 1200px) {
    .theme-header-inner {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
    }

    .theme-navbar .theme-header-collapse {
        display: contents !important;
    }

    .theme-header-top {
        display: flex;
        justify-self: end;
        align-items: center;
        gap: 1rem;
    }

    .theme-nav {
        grid-column: 1 / -1;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 0.75rem;
        border-top: 1px solid var(--theme-border);
    }

    .theme-nav > .nav-item + .nav-item::before {
        content: "";
        position: absolute;
        top: 50%;
        inset-inline-start: 0;
        width: 0.3rem;
        height: 0.3rem;
        background: var(--theme-gold);
        transform: translateY(-50%) rotate(45deg);
    }

    .theme-nav > .nav-item > .nav-link::before {
        content: "";
        position: absolute;
        inset-inline: 1.1rem;
        bottom: 0.45rem;
        height: 2px;
        border-radius: 2px;
        background: var(--theme-gold);
        transform: scaleX(0);
        transition: transform 0.3s var(--theme-ease);
    }

    .theme-nav > .nav-item > .nav-link:hover::before,
    .theme-nav > .nav-item > .nav-link.active::before,
    .theme-nav > .nav-item > .nav-link.show::before {
        transform: scaleX(1);
    }

    .theme-nav > .nav-item {
        position: relative;
    }

    .theme-nav .dropdown-menu {
        margin-top: 0.4rem !important;
    }
}

@media (max-width: 1199.98px) {
    .theme-header-collapse {
        flex-basis: 100%;
    }

    .theme-header-collapse.show,
    .theme-header-collapse.collapsing {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .theme-nav {
        order: -1;
        margin-top: 0.75rem;
        border-top: 1px solid var(--theme-border);
    }

    .theme-nav > .nav-item {
        border-bottom: 1px solid var(--theme-border);
    }

    .theme-nav .nav-link {
        padding: 0.75rem 0.25rem !important;
    }

    .theme-nav .dropdown-menu {
        margin: 0 0.5rem 0.5rem;
    }

    .theme-header-top {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 0.75rem;
    }

    .theme-subnav {
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--theme-border);
    }

    .theme-header-actions {
        flex-wrap: wrap;
        justify-content: space-between;
        padding-bottom: 0.5rem;
    }
}

/* Sections */

.theme-section {
    padding-top: clamp(3rem, 7vw, 6rem);
}

.theme-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.theme-section-title {
    margin: 0.75rem 0 0;
    color: var(--theme-ink);
    font-size: clamp(1.75rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.35;
}

/* Hero */

@keyframes theme-spin {
    to {
        transform: rotate(360deg);
    }
}

.theme-hero {
    padding-top: clamp(1.25rem, 2.5vw, 2rem);
}

.theme-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr);
    gap: 1.25rem;
    align-items: stretch;
}

.theme-hero-lead {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.theme-hero-main .theme-overlay-card {
    aspect-ratio: 16 / 9;
    min-height: 0;
}

.theme-hero-main .theme-overlay-card-body strong {
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
}

.theme-hero-pair,
.theme-category-pair {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

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

.theme-hero-pair .theme-overlay-card {
    aspect-ratio: 16 / 10;
    min-height: 0;
}

.theme-hero-pair .theme-overlay-card,
.theme-category-pair .theme-overlay-card {
    border-radius: var(--theme-radius-sm);
}

.theme-hero-pair .theme-overlay-card-body,
.theme-category-pair .theme-overlay-card-body {
    inset-inline: 0.9rem;
    bottom: 0.8rem;
}

.theme-hero-pair .theme-overlay-card-body strong,
.theme-category-pair .theme-overlay-card-body strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.theme-hero-pair .theme-overlay-card-arrow,
.theme-category-pair .theme-overlay-card-arrow {
    top: 0.65rem;
    inset-inline-end: 0.65rem;
    width: 2.25rem;
    height: 2.25rem;
}

/* Post lists (mini cards / numbered) */

.theme-post-list {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: 0.4rem 1rem;
    border-radius: var(--theme-radius-md);
    background: var(--theme-white);
    box-shadow: var(--theme-shadow);
    counter-reset: theme-post-list;
}

.theme-mini-card {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0.8rem;
    min-height: 0;
    padding-block: 0.6rem;
    border-bottom: 1px solid var(--theme-border);
    color: var(--theme-ink);
    counter-increment: theme-post-list;
}

.theme-mini-card:last-child {
    border-bottom: 0;
}

.theme-mini-card:hover {
    color: var(--theme-primary);
}

.theme-mini-card-thumb {
    flex-shrink: 0;
    width: 5.25rem;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 0.6rem;
    background: var(--theme-gold-soft);
}

.theme-mini-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--theme-ease);
}

.theme-mini-card:hover .theme-mini-card-thumb img {
    transform: scale(1.08);
}

.theme-mini-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.theme-mini-card-body small {
    overflow: hidden;
    color: var(--theme-terracotta);
    font-size: 0.75rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-mini-card-body strong {
    display: -webkit-box;
    overflow: hidden;
    font-family: var(--theme-heading-font);
    font-size: 0.875rem;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.theme-post-list-numbered .theme-mini-card-thumb {
    display: none;
}

.theme-post-list-numbered .theme-mini-card::before {
    content: counter(theme-post-list, decimal-leading-zero);
    flex-shrink: 0;
    min-width: 2.6rem;
    color: transparent;
    font-family: var(--theme-heading-font);
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
    -webkit-text-stroke: 1.25px var(--theme-ink);
    transition: color 0.3s ease, -webkit-text-stroke-color 0.3s ease;
}

.theme-post-list-numbered .theme-mini-card:hover::before {
    color: var(--theme-gold-bright);
    -webkit-text-stroke-color: var(--theme-gold-dark);
}

@media (max-width: 1199.98px) {
    .theme-hero-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme-hero-lead {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .theme-hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .theme-hero-main .theme-overlay-card {
        aspect-ratio: 16 / 10;
    }
}

/* Categories bento */

.theme-bento {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 13rem;
    gap: 1rem;
}

.theme-bento-tile {
    --bento-bg: var(--theme-primary);
    --bento-fg: var(--theme-white);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: var(--theme-radius-md);
    background: var(--bento-bg);
    color: var(--bento-fg);
    isolation: isolate;
    transition: transform 0.45s var(--theme-ease), box-shadow 0.45s var(--theme-ease);
}

.theme-bento-tile:hover {
    color: var(--bento-fg);
    transform: translateY(-0.35rem);
    box-shadow: var(--theme-shadow-hover);
}

.theme-bento-tile:nth-child(6n + 1),
.theme-bento-tile:nth-child(6n + 5) {
    grid-column: span 2;
}

.theme-bento-tile:nth-child(6n + 2) {
    --bento-bg: var(--theme-gold-bright);
    --bento-fg: var(--theme-ink);
}

.theme-bento-tile:nth-child(6n + 3) {
    --bento-bg: var(--theme-ink);
    --bento-fg: var(--theme-white);
}

.theme-bento-tile:nth-child(6n + 4) {
    --bento-bg: var(--theme-terracotta);
    --bento-fg: var(--theme-white);
}

.theme-bento-tile:nth-child(6n + 5) {
    --bento-bg: var(--theme-white);
    --bento-fg: var(--theme-ink);
}

.theme-bento-tile:nth-child(6n + 6) {
    --bento-bg: var(--theme-gold-soft);
    --bento-fg: var(--theme-primary);
    border: 1px solid var(--theme-border);
}

.theme-bento-count {
    align-self: flex-start;
    padding: 0.2rem 0.75rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.85;
}

.theme-bento-title {
    position: relative;
    z-index: 1;
    max-width: 14ch;
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    font-weight: 700;
    line-height: 1.5;
}

.theme-bento-image {
    position: absolute;
    z-index: -1;
    inset-inline-end: 1.25rem;
    top: 1.25rem;
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
}

.theme-bento-arrow {
    position: absolute;
    inset-inline-end: 1.25rem;
    bottom: 1.25rem;
    border-color: transparent;
}

.theme-bento-tile:hover .theme-arrow {
    transform: rotate(0deg);
}

[dir="ltr"] .theme-bento-tile:hover .theme-arrow {
    transform: rotate(180deg);
}

.theme-bento-star {
    position: absolute;
    z-index: -2;
    inset-inline-start: -2.5rem;
    bottom: -2.5rem;
    width: 9rem;
    height: 9rem;
    opacity: 0.12;
    transition: transform 0.8s var(--theme-ease);
}

.theme-bento-tile:hover .theme-bento-star {
    transform: rotate(45deg);
}

.theme-bento-tile:nth-child(6n + 5) {
    border: 1px solid var(--theme-border);
}

.theme-bento-tile:nth-child(6n + 5) .theme-bento-star {
    color: var(--theme-gold);
    opacity: 0.25;
}

.theme-bento-tile:nth-child(6n + 5) .theme-bento-arrow,
.theme-bento-tile:nth-child(6n + 6) .theme-bento-arrow {
    border-color: var(--theme-border);
}

@media (max-width: 991.98px) {
    .theme-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 11rem;
    }

    .theme-bento-tile:nth-child(6n + 5) {
        grid-column: auto;
    }

    .theme-bento-tile:nth-child(6n + 6) {
        grid-column: span 2;
    }
}

@media (max-width: 575.98px) {
    .theme-bento {
        grid-auto-rows: 10rem;
        gap: 0.75rem;
    }

    .theme-bento-tile {
        padding: 1rem;
    }

    .theme-bento-image {
        width: 3rem;
        height: 3rem;
        top: 1rem;
        inset-inline-end: 1rem;
    }

    .theme-bento-arrow {
        width: 2.25rem;
        height: 2.25rem;
        inset-inline-end: 1rem;
        bottom: 1rem;
    }
}

/* Overlay card */

.theme-overlay-card {
    position: relative;
    display: block;
    height: 100%;
    min-height: 22rem;
    overflow: hidden;
    border-radius: var(--theme-radius-md);
    background: var(--theme-ink);
    color: var(--theme-white);
    isolation: isolate;
}

.theme-overlay-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--theme-ease);
}

.theme-overlay-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(43, 15, 23, 0.92) 0%, rgba(43, 15, 23, 0.35) 45%, rgba(43, 15, 23, 0) 70%);
}

.theme-overlay-card:hover {
    color: var(--theme-white);
}

.theme-overlay-card:hover img {
    transform: scale(1.06);
}

.theme-overlay-card-arrow {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    border-color: transparent;
}

.theme-overlay-card:hover .theme-overlay-card-arrow {
    background: var(--theme-gold-bright);
    color: var(--theme-ink);
}

.theme-overlay-card:hover .theme-arrow {
    transform: rotate(0deg);
}

[dir="ltr"] .theme-overlay-card:hover .theme-arrow {
    transform: rotate(180deg);
}

.theme-overlay-card-body {
    position: absolute;
    inset-inline: 1.25rem;
    bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.theme-overlay-card-body small {
    align-self: flex-start;
    padding: 0.15rem 0.7rem;
    border-radius: 999px;
    background: var(--theme-gold-bright);
    color: var(--theme-ink);
    font-size: 0.75rem;
    font-weight: 600;
}

.theme-overlay-card-body strong {
    font-family: var(--theme-heading-font);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Rail */

.theme-rail-controls {
    display: flex;
    gap: 0.5rem;
}

.theme-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(15rem, calc((100% - 3rem) / 4));
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.theme-rail::-webkit-scrollbar {
    display: none;
}

.theme-rail-item {
    scroll-snap-align: start;
}

.theme-rail-item .theme-overlay-card {
    aspect-ratio: 4 / 3;
    min-height: 0;
}

@media (max-width: 575.98px) {
    .theme-rail {
        grid-auto-columns: 78%;
    }
}

/* Post card */

.theme-post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.6rem;
    border-radius: var(--theme-radius-md);
    background: var(--theme-white);
    color: var(--theme-ink);
    box-shadow: var(--theme-shadow);
    transition: transform 0.45s var(--theme-ease), box-shadow 0.45s var(--theme-ease);
}

.theme-post-card:hover {
    color: var(--theme-ink);
    transform: translateY(-0.35rem);
    box-shadow: var(--theme-shadow-hover);
}

.theme-post-card-media {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: calc(var(--theme-radius-md) - 0.4rem);
    background: var(--theme-gold-soft);
}

.theme-post-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--theme-ease);
}

.theme-post-card:hover .theme-post-card-media img {
    transform: scale(1.05);
}

.theme-post-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.9rem 0.6rem 0.4rem;
}

.theme-post-card-body strong {
    display: -webkit-box;
    overflow: hidden;
    font-family: var(--theme-heading-font);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.theme-post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: auto;
    color: var(--theme-muted);
    font-size: 0.8rem;
}

.theme-post-card-footer .theme-circle-link {
    width: 2.25rem;
    height: 2.25rem;
}

.theme-post-card:hover .theme-circle-link {
    border-color: var(--theme-terracotta);
    background: var(--theme-terracotta);
    color: var(--theme-white);
}

.theme-post-card:hover .theme-arrow {
    transform: rotate(0deg);
}

[dir="ltr"] .theme-post-card:hover .theme-arrow {
    transform: rotate(180deg);
}

/* Ink canvas (latest posts) */

.theme-ink-canvas {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 3.5rem);
    border-radius: var(--theme-radius-lg);
    background: var(--theme-ink);
    isolation: isolate;
}

.theme-ink-canvas-star {
    position: absolute;
    z-index: -1;
    top: -6rem;
    inset-inline-end: -6rem;
    width: 22rem;
    height: 22rem;
    color: var(--theme-ink-soft);
    animation: theme-spin 60s linear infinite;
}

.theme-ink-canvas .theme-section-title {
    color: var(--theme-white);
}

.theme-ink-canvas .theme-chip {
    border-color: rgba(255, 255, 255, 0.18);
    background: transparent;
    color: var(--theme-gold-bright);
}

.theme-ink-canvas .theme-chip::before {
    background: var(--theme-gold-bright);
}

.theme-latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    counter-reset: theme-latest;
}

.theme-latest-grid .theme-post-card {
    position: relative;
    counter-increment: theme-latest;
}

.theme-latest-grid .theme-post-card::before {
    content: counter(theme-latest, decimal-leading-zero);
    position: absolute;
    z-index: 1;
    top: 1.1rem;
    inset-inline-start: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--theme-gold-bright);
    color: var(--theme-ink);
    font-family: var(--theme-heading-font);
    font-size: 0.85rem;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .theme-latest-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .theme-latest-grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 82%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .theme-latest-grid::-webkit-scrollbar {
        display: none;
    }

    .theme-latest-grid .theme-post-card {
        scroll-snap-align: start;
    }
}

/* Category blocks */

.theme-category-block {
    padding-top: clamp(2.5rem, 5vw, 4rem);
}

.theme-category-block .theme-section-head {
    margin-bottom: 1.25rem;
}

.theme-category-grid {
    display: flex;
    gap: 1rem;
    height: clamp(22rem, 30vw, 26rem);
}

.theme-category-lead {
    flex: 5 1 0;
    min-width: 0;
}

.theme-category-pair {
    flex: 3 1 0;
    grid-auto-rows: minmax(0, 1fr);
}

.theme-category-grid .theme-post-list {
    flex: 4 1 0;
}

.theme-category-lead .theme-overlay-card,
.theme-category-pair .theme-overlay-card {
    min-height: 0;
}

.theme-category-block:nth-of-type(even) .theme-category-lead {
    order: 3;
}

.theme-category-block:nth-of-type(even) .theme-category-pair {
    order: 2;
}

.theme-category-block:nth-of-type(even) .theme-post-list {
    order: 1;
}

.theme-category-block:nth-of-type(even) .theme-mini-card-thumb {
    display: none;
}

.theme-category-block:nth-of-type(even) .theme-mini-card::before {
    content: counter(theme-post-list, decimal-leading-zero);
    flex-shrink: 0;
    min-width: 2.6rem;
    color: transparent;
    font-family: var(--theme-heading-font);
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
    -webkit-text-stroke: 1.25px var(--theme-ink);
    transition: color 0.3s ease, -webkit-text-stroke-color 0.3s ease;
}

.theme-category-block:nth-of-type(even) .theme-mini-card:hover::before {
    color: var(--theme-gold-bright);
    -webkit-text-stroke-color: var(--theme-gold-dark);
}

.theme-category-block:nth-of-type(even) .theme-section-head .theme-chip::before {
    background: var(--theme-primary);
}

@media (max-width: 991.98px) {
    .theme-category-grid {
        flex-direction: column;
        height: auto;
    }

    .theme-category-block:nth-of-type(n) .theme-category-lead,
    .theme-category-block:nth-of-type(n) .theme-category-pair,
    .theme-category-block:nth-of-type(n) .theme-post-list {
        flex: none;
        order: 0;
    }

    .theme-category-lead .theme-overlay-card {
        aspect-ratio: 16 / 10;
    }

    .theme-category-pair {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }

    .theme-category-pair .theme-overlay-card {
        aspect-ratio: 16 / 10;
    }
}

.theme-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem 1rem;
    border: 1px dashed var(--theme-border);
    border-radius: var(--theme-radius-md);
    background: var(--theme-white);
    text-align: center;
}

.theme-empty-star {
    width: 3rem;
    height: 3rem;
    color: var(--theme-gold);
}

.theme-empty p {
    margin: 0;
    font-weight: 600;
}

/* Footer */

.theme-footer {
    padding-top: clamp(3rem, 7vw, 6rem);
}

.theme-footer-card {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3.5rem) 1.5rem;
    border-radius: var(--theme-radius-lg) var(--theme-radius-lg) 0 0;
    background: var(--theme-ink);
    color: rgba(255, 255, 255, 0.8);
    isolation: isolate;
}

.theme-footer-star {
    position: absolute;
    z-index: -1;
    top: -3rem;
    inset-inline-start: -3rem;
    width: 12rem;
    height: 12rem;
    color: var(--theme-terracotta);
    opacity: 0.2;
}

.theme-footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.theme-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--theme-white);
    font-family: var(--theme-heading-font);
    font-size: 1.15rem;
    font-weight: 700;
}

.theme-footer-brand:hover {
    color: var(--theme-gold-bright);
}

.theme-footer-logo {
    max-height: 3rem;
    width: auto;
    padding: 0.35rem;
    border-radius: 0.75rem;
    background: var(--theme-white);
}

.theme-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.theme-footer-social .theme-circle-link {
    border-color: rgba(255, 255, 255, 0.18);
    background: transparent;
    color: var(--theme-white);
}

.theme-footer-social .theme-circle-link:hover {
    border-color: var(--theme-gold-bright);
    background: var(--theme-gold-bright);
    color: var(--theme-ink);
}

.theme-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.theme-footer-link {
    padding: 0.35rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.theme-footer-link:hover {
    background: var(--theme-white);
    color: var(--theme-ink);
}

.theme-footer-wordmark {
    margin: clamp(1.5rem, 4vw, 3rem) 0 0;
    overflow: hidden;
    color: transparent;
    font-family: var(--theme-heading-font);
    font-size: clamp(2.5rem, 10vw, 8.5rem);
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    -webkit-text-stroke: 1px rgba(226, 194, 70, 0.45);
}

.theme-footer-copyright {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    text-align: center;
}

.theme-scroll-top {
    position: fixed;
    z-index: 1020;
    bottom: 1.25rem;
    inset-inline-end: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 50%;
    background: var(--theme-terracotta);
    color: var(--theme-white);
    box-shadow: var(--theme-shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    transition: opacity 0.3s ease, transform 0.3s var(--theme-ease), visibility 0.3s;
}

.theme-scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.theme-scroll-top:hover {
    background: var(--theme-ink);
}

/* Inner pages: head */

.theme-page-head {
    position: relative;
    padding-top: clamp(1.75rem, 4vw, 3rem);
}

.theme-page-head .theme-shell {
    position: relative;
}

.theme-page-head-star {
    position: absolute;
    top: 0;
    inset-inline-end: 1.5rem;
    width: clamp(2.25rem, 5vw, 3.75rem);
    height: clamp(2.25rem, 5vw, 3.75rem);
    color: var(--theme-gold-bright);
    pointer-events: none;
    animation: theme-spin 28s linear infinite;
}

.theme-breadcrumb {
    --bs-breadcrumb-divider: "/";
    --bs-breadcrumb-divider-color: var(--theme-gold);
    --bs-breadcrumb-item-active-color: var(--theme-muted);
    flex-wrap: wrap;
    gap: 0.15rem 0;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.theme-breadcrumb a {
    color: var(--theme-ink);
}

.theme-breadcrumb a:hover {
    color: var(--theme-primary);
}

.theme-page-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
}

.theme-page-avatar {
    width: clamp(4.5rem, 9vw, 6rem);
    height: clamp(4.5rem, 9vw, 6rem);
    object-fit: cover;
    border: 4px solid var(--theme-white);
    border-radius: 50%;
    box-shadow: -0.35rem 0.35rem 0 var(--theme-gold-bright);
}

[dir="ltr"] .theme-page-avatar {
    box-shadow: 0.35rem 0.35rem 0 var(--theme-gold-bright);
}

.theme-page-title {
    max-width: 30ch;
    margin: 0.75rem 0 0;
    color: var(--theme-ink);
    font-size: clamp(1.85rem, 4.5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.4;
}

.theme-subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.75rem;
}

.theme-subcategory {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.4rem;
    padding-inline-start: 1rem;
    border: 1px solid var(--theme-border);
    border-radius: 999px;
    background: var(--theme-white);
    color: var(--theme-ink);
    font-size: 0.9rem;
    font-weight: 600;
    transition: border-color 0.25s ease, color 0.25s ease;
}

.theme-subcategory:hover {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

.theme-page-body {
    padding-top: clamp(1.75rem, 4vw, 3rem);
}

/* Inner pages: layout */

.theme-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.theme-layout-main,
.theme-layout-aside {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

@media (min-width: 1200px) {
    .theme-layout {
        grid-template-columns: minmax(0, 1fr) 20rem;
        gap: 2rem;
    }

    .theme-sticky-sidebar {
        position: sticky;
        top: calc(var(--theme-header-height) + 1rem);
        max-height: calc(100vh - var(--theme-header-height) - 2rem);
        overflow-y: auto;
        margin: -0.5rem;
        padding: 0.5rem;
        scrollbar-width: thin;
        scrollbar-color: var(--theme-border) transparent;
    }
}

.theme-panel {
    padding: 1.25rem;
    border-radius: var(--theme-radius-md);
    background: var(--theme-white);
    box-shadow: var(--theme-shadow);
}

.theme-panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    color: var(--theme-ink);
    font-family: var(--theme-heading-font);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.6;
}

.theme-panel-title::before {
    content: "";
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    background: var(--theme-gold);
    transform: rotate(45deg);
}

.theme-side-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.theme-side-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    color: var(--theme-ink);
    font-size: 0.925rem;
    font-weight: 600;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.theme-side-link:hover {
    background: var(--theme-gold-soft);
    color: var(--theme-ink);
}

.theme-side-link.active {
    background: var(--theme-primary);
    color: var(--theme-white);
}

.theme-side-link-count {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    min-width: 1.85rem;
    height: 1.85rem;
    padding-inline: 0.45rem;
    border-radius: 999px;
    background: var(--theme-gold-soft);
    color: var(--theme-gold-text);
    font-size: 0.75rem;
    font-weight: 700;
}

.theme-side-link.active .theme-side-link-count {
    background: rgba(255, 255, 255, 0.18);
    color: var(--theme-white);
}

.theme-mini-posts {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.theme-mini-post {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--theme-ink);
}

.theme-mini-post:hover {
    color: var(--theme-primary);
}

.theme-mini-post-thumb {
    flex-shrink: 0;
    width: 4.5rem;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 0.65rem;
    background: var(--theme-gold-soft);
}

.theme-mini-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme-mini-post-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.theme-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.theme-tags-label {
    font-size: 0.875rem;
    font-weight: 700;
}

.theme-definition-list {
    margin: 0;
    font-size: 0.875rem;
}

.theme-definition-list > div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding-block: 0.5rem;
    border-bottom: 1px dashed var(--theme-border);
}

.theme-definition-list > div:last-child {
    border-bottom: 0;
}

.theme-definition-list dt {
    color: var(--theme-muted);
    font-weight: 600;
}

.theme-definition-list dd {
    margin: 0;
    font-weight: 700;
    text-align: end;
}

.theme-description {
    line-height: 1.9;
}

.theme-description img {
    max-width: 100%;
    height: auto;
}

/* Inner pages: post cards grid */

.theme-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 991.98px) {
    .theme-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .theme-posts-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

article.theme-post-card {
    position: relative;
}

.theme-post-card-title {
    margin: 0;
    font-family: var(--theme-heading-font);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.7;
}

.theme-post-card-title a {
    display: -webkit-box;
    overflow: hidden;
    color: var(--theme-ink);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.theme-post-card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.theme-post-card-brief {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--theme-muted);
    font-size: 0.875rem;
    line-height: 1.8;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

article.theme-post-card .theme-post-card-footer {
    color: var(--theme-primary);
    font-family: var(--theme-heading-font);
    font-size: 0.85rem;
    font-weight: 700;
}

.theme-category-tiles .theme-bento-tile:nth-child(n) {
    grid-column: auto;
}

.theme4 .pagination {
    gap: 0.4rem;
    --bs-pagination-border-width: 0;
}

.theme4 .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--theme-border) !important;
    border-radius: 999px !important;
    background: var(--theme-white);
    color: var(--theme-ink);
    font-weight: 700;
}

.theme4 .page-link:hover {
    border-color: var(--theme-primary) !important;
    background: var(--theme-white);
    color: var(--theme-primary);
}

.theme4 .page-item.active .page-link {
    border-color: var(--theme-ink) !important;
    background: var(--theme-ink);
    color: var(--theme-white);
}

.theme-pagination-wrap {
    margin-top: 2rem;
}

/* Inner pages: post */

.theme-post-title {
    max-width: 40ch;
}

.theme-post-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 1rem 0 0;
    font-size: 0.925rem;
}

.theme-post-options > div {
    display: flex;
    gap: 0.4rem;
}

.theme-post-options dt {
    color: var(--theme-muted);
    font-weight: 600;
}

.theme-post-options dd {
    margin: 0;
    font-weight: 700;
}

.theme-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--theme-border);
}

.theme-post-meta-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.theme-post-meta-items > span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    background: var(--theme-white);
    color: var(--theme-ink);
    font-size: 0.85rem;
    font-weight: 600;
}

.theme-reader-tools {
    display: flex;
    gap: 0.4rem;
}

.theme-reader-tools button {
    font-family: var(--theme-heading-font);
    font-size: 0.85rem;
    font-weight: 700;
}

.theme-reader-card {
    padding: clamp(1rem, 3.5vw, 2.5rem);
    border-radius: var(--theme-radius-lg);
    background: var(--theme-white);
    box-shadow: var(--theme-shadow);
}

.theme-featured,
.theme-video,
.theme-audio {
    margin: 0 0 1.75rem;
}

.theme-featured-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--theme-radius-md);
}

.theme-video .ratio {
    overflow: hidden;
    border-radius: var(--theme-radius-md) !important;
}

.theme-reader-card .card {
    border: 0 !important;
    background: transparent;
    box-shadow: none !important;
}

.theme-reader-card .card-body {
    padding-inline: 0 !important;
}

.theme-brief {
    margin-bottom: 1.75rem;
    padding: 1.1rem 1.35rem;
    border-inline-start: 4px solid var(--theme-gold);
    border-radius: var(--theme-radius-sm);
    background: var(--theme-gold-soft);
    color: var(--theme-ink);
    line-height: 1.9;
}

.theme-brief > :last-child {
    margin-bottom: 0;
}

.theme-article-body {
    max-width: 48rem;
    margin-inline: auto;
    font-size: 1.1875rem;
    line-height: 2.1;
    overflow-wrap: break-word;
}

.theme-article-body p {
    margin-bottom: 1.25rem;
}

.theme-article-body h2,
.theme-article-body h3,
.theme-article-body h4 {
    color: var(--theme-primary);
    font-family: var(--theme-heading-font);
    font-weight: 700;
    scroll-margin-top: calc(var(--theme-header-height) + 5rem);
}

.theme-article-body h2 {
    position: relative;
    margin: 2.25rem 0 1rem;
    padding-inline-start: 1.25rem;
    font-size: 1.5rem;
    line-height: 1.5;
}

.theme-article-body h2::before {
    content: "";
    position: absolute;
    top: 0.7em;
    inset-inline-start: 0;
    width: 0.55rem;
    height: 0.55rem;
    background: var(--theme-gold);
    transform: rotate(45deg);
}

.theme-article-body h3 {
    margin: 1.75rem 0 0.75rem;
    font-size: 1.25rem;
    line-height: 1.55;
}

.theme-article-body h4 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.theme-article-body .quran-verse,
.theme-article-body .quran,
.theme-article-body [data-quran],
.theme-article-body .ayah {
    display: inline;
    color: var(--theme-primary-dark);
    font-family: "Traditional Arabic", "Geeza Pro", serif;
    font-size: 1.25em;
    font-weight: 600;
    line-height: 2.3;
}

.theme-article-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.35rem;
    border-inline-start: 4px solid var(--theme-gold);
    border-radius: var(--theme-radius-sm);
    background: var(--theme-gold-soft);
    color: var(--theme-primary-dark);
    font-family: "Traditional Arabic", "Geeza Pro", serif;
    font-size: 1.25em;
    line-height: 2.2;
}

[dir="ltr"] .theme-article-body blockquote {
    font-family: inherit;
    font-size: 1.05em;
    line-height: 1.8;
}

.theme-article-body img,
.theme-article-body iframe,
.theme-article-body video {
    max-width: 100%;
    height: auto;
    border-radius: var(--theme-radius-sm);
}

.theme-article-body table {
    width: 100%;
    margin-bottom: 1.25rem;
    border-collapse: collapse;
    font-size: 0.95em;
}

.theme-article-body th,
.theme-article-body td {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--theme-border);
}

.theme-article-body th {
    background: var(--theme-gold-soft);
}

.theme-article-body a {
    color: var(--theme-link-text);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.theme-attachments {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

.theme-attachment {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius-sm);
    color: var(--theme-ink);
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.theme-attachment:hover {
    border-color: var(--theme-primary);
    background: var(--theme-primary-soft);
    color: var(--theme-ink);
}

.theme-attachment-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: var(--theme-primary-soft);
    color: var(--theme-primary);
    font-size: 1.15rem;
}

.theme-attachment-title {
    flex: 1;
    font-weight: 700;
}

.theme-post-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--theme-border);
}

.theme-lesson-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.theme-lesson-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--theme-radius-md);
    background: var(--theme-white);
    color: var(--theme-ink);
    box-shadow: var(--theme-shadow);
    transition: transform 0.4s var(--theme-ease), box-shadow 0.4s var(--theme-ease);
}

.theme-lesson-nav:hover {
    color: var(--theme-ink);
    transform: translateY(-0.25rem);
    box-shadow: var(--theme-shadow-hover);
}

.theme-lesson-nav-next {
    grid-column: 2;
    justify-content: flex-end;
    text-align: end;
}

.theme-lesson-nav-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.theme-lesson-nav-body small {
    color: var(--theme-terracotta);
    font-size: 0.8rem;
    font-weight: 700;
}

.theme-lesson-nav-body strong {
    overflow: hidden;
    font-family: var(--theme-heading-font);
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-lesson-nav:hover .theme-circle-link {
    border-color: var(--theme-terracotta);
    background: var(--theme-terracotta);
    color: var(--theme-white);
}

@media (max-width: 575.98px) {
    .theme-lesson-navigation {
        grid-template-columns: minmax(0, 1fr);
    }

    .theme-lesson-nav-next {
        grid-column: auto;
    }
}

/* Inner pages: related */

.theme-related {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

.theme-related-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.theme-related-title {
    margin: 0;
    color: var(--theme-ink);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
}

/* Inner pages: table of contents */

.theme-toc-header {
    align-items: flex-start;
}

.theme-toc-header .theme-panel-title {
    margin-bottom: 0.15rem;
}

.theme-toc-badge {
    color: var(--theme-muted);
    font-size: 0.8rem;
}

.theme-toc-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.theme-toc-list .front-toc-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding-block: 0.55rem;
    border-bottom: 1px dashed var(--theme-border);
}

.theme-toc-list .front-toc-item:last-child {
    border-bottom: 0;
}

.theme-toc-list .front-toc-num {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: var(--theme-gold-soft);
    color: var(--theme-gold-text);
    font-size: 0.8rem;
    font-weight: 700;
}

.theme-toc-list .front-toc-link {
    color: var(--theme-ink);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.7;
}

.theme-toc-list .front-toc-link:hover {
    color: var(--theme-primary);
}

.theme-toc-toggle {
    position: sticky;
    z-index: 1010;
    top: calc(var(--theme-header-height) + 0.75rem);
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    padding: 0.7rem 1.15rem;
    border: 0;
    border-radius: 999px;
    background: var(--theme-ink);
    color: var(--theme-white);
    font-family: var(--theme-heading-font);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: var(--theme-shadow-hover);
}

.theme-toc-toggle span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-toc.offcanvas-bottom {
    --bs-offcanvas-height: auto;
    max-width: 48rem;
    max-height: 70vh;
    margin-inline: auto;
    border-radius: var(--theme-radius-md) var(--theme-radius-md) 0 0;
}

.theme-toc .offcanvas-header {
    border-bottom: 1px solid var(--theme-border);
}

@media print {
    .theme-header,
    .theme-footer,
    .theme-sticky-sidebar,
    .theme-reader-tools,
    .theme-toc-toggle,
    .theme-scroll-top,
    .theme-page-head-star,
    .theme-lesson-navigation,
    #front-related-posts {
        display: none !important;
    }

    .theme-layout {
        display: block;
    }

    .theme-reader-card {
        padding: 0;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme4 *,
    .theme4 *::before,
    .theme4 *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
