/**
 * Favorite CMS — Default Theme ("Calm Editorial")
 * Mobile-first, system fonts, no external dependencies.
 */

/* 1. Tokens ================================================================= */
:root {
    --accent: #3056d3;
    --accent-hover: #2445ad;
    --accent-soft: #eef2fd;

    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-muted: #f1f4f9;
    --text: #253044;
    --heading: #0f172a;
    --muted: #5b6678;
    --border: #e3e7ef;
    --border-strong: #cdd4e0;

    --footer-bg: #0f172a;
    --footer-text: #cbd5e1;
    --footer-muted: #94a3b8;
    --footer-line: rgba(148, 163, 184, 0.2);

    --success-bg: #ecfdf3;
    --success-border: #a6e9c0;
    --success-text: #0f5132;
    --danger-bg: #fef2f2;
    --danger-border: #f5c2c2;
    --danger-text: #8a1c1c;

    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Bengali", "Nirmala UI", Vrinda, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 2.5rem;
    --space-8: 3rem;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.18);
    --shadow-pop: 0 12px 32px -8px rgba(15, 23, 42, 0.22);

    --container: 1280px;
    --gutter: clamp(16px, 4vw, 32px);
    --sidebar: 300px;
    --layout-gap: 40px;
    --reading: 45rem;
    --header-h: 64px;
}

:root[data-theme="dark"],
html[data-theme="dark"] {
    --bg: #0b1120;
    --surface: #1e293b;
    --surface-muted: #0f172a;
    --text: #f1f5f9;
    --heading: #ffffff;
    --muted: #94a3b8;
    --border: #334155;
    --border-strong: #475569;

    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-soft: rgba(59, 130, 246, 0.15);

    --footer-bg: #070d19;
    --footer-text: #cbd5e1;
    --footer-muted: #94a3b8;
    --footer-line: rgba(148, 163, 184, 0.15);

    --success-bg: rgba(34, 197, 94, 0.15);
    --success-border: #166534;
    --success-text: #86efac;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --danger-border: #991b1b;
    --danger-text: #fca5a5;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.5);
    --shadow-pop: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
}

.header-theme-toggle-wrap {
    display: flex;
    align-items: center;
}
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--heading);
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle-btn:hover {
    background: var(--surface-muted);
    transform: scale(1.05);
}
.theme-toggle-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-soft);
    border-color: var(--accent);
}
.theme-toggle-btn .theme-icon-sun,
.theme-toggle-btn .theme-icon-moon {
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
[data-theme="dark"] .theme-toggle-btn .theme-icon-sun { display: inline-flex; }
[data-theme="dark"] .theme-toggle-btn .theme-icon-moon { display: none; }
:root:not([data-theme="dark"]) .theme-toggle-btn .theme-icon-sun { display: none; }
:root:not([data-theme="dark"]) .theme-toggle-btn .theme-icon-moon { display: inline-flex; }

@supports (color: color-mix(in srgb, red 50%, blue)) {
    :root {
        --accent-hover: color-mix(in srgb, var(--accent) 80%, #000);
        --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--surface));
    }
}

/* 2. Base =================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.5em;
    color: var(--heading);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

:lang(bn) h1, :lang(bn) h2, :lang(bn) h3, :lang(bn) h4 { letter-spacing: 0; line-height: 1.35; }

p { margin: 0 0 1em; }

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

img, video, svg { max-width: 100%; }
img, video { height: auto; }

.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-main:focus { outline: none; }

button, input, textarea, select { font: inherit; }

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: var(--space-4);
    top: -100px;
    z-index: 200;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    background: var(--heading);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { top: var(--space-4); color: #fff; }

.container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
}

/* 3. Buttons & forms ======================================================== */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 44px;
    padding: 0 1.125rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.button--primary { background: var(--accent); color: #fff; }
.button--primary:hover { background: var(--accent-hover); color: #fff; }
.button--secondary { background: var(--surface); border-color: var(--border-strong); color: var(--heading); }
.button--secondary:hover { background: var(--surface-muted); color: var(--heading); }
.button--small { min-height: 38px; padding: 0 0.875rem; font-size: 0.875rem; }

.search-form { position: relative; display: flex; width: 100%; }
.search-form__input,
.widget-search-input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 2.875rem 0 0.875rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--heading);
}
.search-form__button,
.widget-search-btn {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.search-form__button:hover, .widget-search-btn:hover { color: var(--accent); }
.search-form__input:focus, .widget-search-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-field { display: grid; gap: 0.375rem; margin-bottom: var(--space-4); }
.form-label { font-weight: 600; font-size: 0.9375rem; color: var(--heading); }
.form-label .required { color: var(--danger-text); }
.form-textarea {
    width: 100%;
    min-height: 8rem;
    padding: 0.75rem 0.875rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--heading);
    resize: vertical;
}

.notice { margin: 0 0 var(--space-5); padding: 0.75rem 1rem; border: 1px solid; border-radius: var(--radius-sm); font-size: 0.9375rem; }
.notice--success { background: var(--success-bg); border-color: var(--success-border); color: var(--success-text); }
.notice--error { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-text); }

/* 4. Header ================================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.header-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 var(--space-4);
    min-height: var(--header-h);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    margin-right: auto;
    padding-block: var(--space-2);
    color: var(--heading);
    text-decoration: none;
}
.site-branding:hover { color: var(--heading); }
.site-custom-logo { display: block; width: auto; max-width: 180px; max-height: 40px; object-fit: contain; }
.site-logo-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font-size: 1.05rem;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.site-title { font-size: 1.125rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.site-tagline { font-size: 0.8125rem; color: var(--muted); line-height: 1.3; }

.mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--heading);
    cursor: pointer;
}
.mobile-nav-toggle .icon-close,
.mobile-nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.mobile-nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.menu, .sub-menu { list-style: none; margin: 0; padding: 0; }
.menu-link { color: var(--text); font-weight: 500; text-decoration: none; }
.main-menu .menu-link:hover { color: var(--accent); background: var(--accent-soft); }
.main-menu .menu-link[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.header-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-2); color: var(--text); font-weight: 500; text-decoration: none; }
.header-link:hover { color: var(--accent); }
.header-right-widgets .widget { margin: 0; }
.header-right-widgets .widget-title { display: none; }

@media (max-width: 1023.98px) {
    .no-js .site-header { position: static; }
    .js .mobile-nav-toggle { display: inline-flex; }

    .header-nav-wrap {
        display: flex;
        flex: 1 0 100%;
        flex-direction: column;
        gap: var(--space-3);
        max-height: calc(100vh - var(--header-h));
        padding: var(--space-3) 0 var(--space-4);
        overflow-y: auto;
        border-top: 1px solid var(--border);
    }
    .js .header-nav-wrap:not(.is-open) { display: none; }

    .main-menu { display: grid; gap: 2px; }
    .main-menu .menu-link { display: flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-sm); }
    .main-menu .sub-menu { margin: 2px 0 2px var(--space-3); padding-left: var(--space-2); border-left: 2px solid var(--border); }

    .header-actions > * { flex: 1 1 auto; }
    .header-actions .button--small { min-height: 44px; }

    .header-account-wrap { padding-top: var(--space-3); border-top: 1px solid var(--border); }
    .header-account-wrap .cms-account-menu, .header-account-wrap .cms-account-trigger { width: 100%; }
    .header-account-wrap .cms-account-trigger { min-height: 44px; justify-content: space-between; }
    .header-account-wrap .cms-account-dropdown { position: static; width: 100%; margin-top: var(--space-2); box-shadow: none; }
}

@media (max-width: 639.98px) {
    .site-tagline { display: none; }
}

@media (min-width: 1024px) {
    .layout--with-sidebar { --layout-gap: 24px; }
    .has-sidebar .entry-content { max-width: none; }
    .header-bar { flex-wrap: nowrap; }
    .header-nav-wrap { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-end; gap: var(--space-3); min-width: 0; }
    .main-nav { min-width: 0; }
    .main-menu { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
    .main-menu > .menu-item { position: relative; }
    .main-menu > .menu-item > .menu-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-3); border-radius: var(--radius-sm); white-space: nowrap; }
    .main-menu > .menu-item-has-children > .menu-link::after {
        content: "";
        width: 0.4em;
        height: 0.4em;
        margin: -0.25em 0 0 0.5em;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(45deg);
    }
    .main-menu .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 120;
        display: none;
        min-width: 220px;
        padding: 0.375rem;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: var(--shadow-pop);
    }
    .main-menu .sub-menu .menu-item { position: relative; }
    .main-menu .sub-menu .sub-menu { top: -0.375rem; left: 100%; }
    .main-menu .menu-item-has-children:hover > .sub-menu,
    .main-menu .menu-item-has-children:focus-within > .sub-menu { display: block; }
    .main-menu .sub-menu .menu-link { display: flex; align-items: center; min-height: 40px; padding: 0 var(--space-3); border-radius: var(--radius-sm); }

    .header-search { width: clamp(10rem, 16vw, 15rem); flex: none; }
    .search-form--header .search-form__input { height: 40px; background: var(--surface-muted); }
    .search-form--header .search-form__button { width: 40px; height: 40px; }
    .header-actions { flex-wrap: nowrap; flex: none; }
}

/* Account menu (Core markup) */
.header-account-wrap { display: flex; align-items: center; flex: none; }
.cms-account-menu { position: relative; display: inline-flex; align-items: center; }
.cms-account-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 40px;
    padding: 0.25rem 0.625rem 0.25rem 0.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--heading);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}
.cms-account-trigger:hover, .cms-account-menu.is-open .cms-account-trigger { border-color: var(--accent); color: var(--accent); }
.cms-account-avatar { display: grid; place-items: center; flex: none; width: 30px; height: 30px; overflow: hidden; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.8125rem; font-weight: 700; }
.cms-account-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.cms-account-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cms-account-chevron { flex: none; width: 14px; height: 14px; color: var(--muted); }
.cms-account-menu.is-open .cms-account-chevron { transform: rotate(180deg); }
.cms-account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 130;
    display: none;
    min-width: 230px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-pop);
}
.cms-account-menu.is-open .cms-account-dropdown { display: block; }
.cms-account-header { display: flex; flex-direction: column; gap: 0.125rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface-muted); }
.cms-account-user-name { font-size: 0.875rem; font-weight: 700; color: var(--heading); }
.cms-account-user-role { font-size: 0.75rem; color: var(--muted); }
.cms-account-list { list-style: none; margin: 0; padding: 0.375rem 0; }
.cms-account-item { margin: 0; }
.cms-account-link { display: flex; align-items: center; gap: 0.625rem; min-height: 40px; padding: 0 1rem; color: var(--text); font-size: 0.875rem; font-weight: 500; text-decoration: none; }
.cms-account-link:hover { background: var(--surface-muted); color: var(--accent); }
.cms-account-link.is-logout { color: var(--danger-text); }
.cms-account-link.is-logout:hover { background: var(--danger-bg); color: var(--danger-text); }
.cms-account-icon { display: grid; place-items: center; width: 18px; height: 18px; color: var(--muted); }
.cms-account-icon svg { width: 16px; height: 16px; }
.cms-account-divider { height: 1px; margin: 0.375rem 0; background: var(--border); list-style: none; }

/* 5. Layout ================================================================= */
.site-content { flex: 1; padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(2.5rem, 5vw, 4rem); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--layout-gap); align-items: start; }
.site-main, .sidebar { min-width: 0; }

@media (min-width: 1024px) {
    .layout--with-sidebar { grid-template-columns: minmax(0, 1fr) var(--sidebar); }
    .site-content-sidebar-left .layout--with-sidebar { grid-template-columns: var(--sidebar) minmax(0, 1fr); }
    .site-content-sidebar-left .layout--with-sidebar > .sidebar { grid-column: 1; grid-row: 1; }
    .site-content-sidebar-left .layout--with-sidebar > .site-main { grid-column: 2; }
}

.no-sidebar .site-main--singular { width: min(100%, 52rem); margin-inline: auto; }
.site-main--narrow { width: min(100%, 48rem); margin-inline: auto; }

/* 6. Listings =============================================================== */
.page-header { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); padding-bottom: clamp(1.25rem, 2.5vw, 1.75rem); border-bottom: 1px solid var(--border); }
.page-header__eyebrow, .home-hero__eyebrow {
    margin: 0 0 0.375rem;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.page-header__title { margin: 0; font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); line-height: 1.2; overflow-wrap: anywhere; }
.page-header__description { max-width: var(--reading); margin: 0.5rem 0 0; color: var(--muted); font-size: 1.0625rem; overflow-wrap: anywhere; }
.page-header__meta { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.875rem; overflow-wrap: anywhere; }
.page-header .search-form { max-width: 32rem; margin-top: var(--space-4); }

.home-hero {
    position: relative;
    margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
    padding: clamp(1.75rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}
.home-hero::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.home-hero__title { margin: 0; font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); line-height: 1.15; overflow-wrap: anywhere; }
.home-hero__tagline { max-width: 40rem; margin: 0.75rem 0 0; color: var(--muted); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem); }

.home-section + .home-section { margin-top: clamp(2rem, 4vw, 3rem); }
.section-heading { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.section-heading::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.section-heading__title { margin: 0; font-size: 1.25rem; }

.post-grid, .featured-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.25rem, 2.5vw, 1.75rem); }

@media (min-width: 640px) {
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .featured-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
    .has-sidebar .featured-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1280px) {
    .no-sidebar .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.post-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.post-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-muted); }
.post-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.is-broken { display: none !important; }
.post-card__body { display: flex; flex: 1; flex-direction: column; gap: 0.625rem; padding: clamp(1rem, 2.5vw, 1.375rem); }
.post-card__categories, .entry-categories { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; }
.category-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.125rem 0.625rem;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent-hover);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.category-pill:hover { background: var(--accent); color: #fff; }
.post-card__title { margin: 0; font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3rem); line-height: 1.35; overflow-wrap: anywhere; }
.post-card__title a { color: var(--heading); text-decoration: none; }
.post-card__title a:hover { color: var(--accent); }
.post-card__excerpt {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9375rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}
.post-card .entry-meta { margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--border); }
.post-card--lead .post-card__title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
.post-card--compact .post-card__body { padding: var(--space-4); }

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.625rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.8125rem;
}
.entry-meta li { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; }
.entry-meta li + li::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.entry-meta a { color: inherit; }
.entry-meta__author-name { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.entry-meta--single { font-size: 0.875rem; }
.avatar {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--heading);
    font-size: 0.75rem;
    font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--large { width: 56px; height: 56px; font-size: 1.25rem; }

.pagination { display: grid; justify-items: center; gap: var(--space-3); margin-top: clamp(1.75rem, 4vw, 2.75rem); }
.pagination__status { margin: 0; color: var(--muted); font-size: 0.875rem; }
.pagination__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
}
a.pagination__link:hover { border-color: var(--accent); color: var(--accent); }
.pagination__link.is-current { border-color: var(--accent); background: var(--accent); color: #fff; }
.pagination__link.is-disabled { opacity: 0.45; }
.pagination__item--gap { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.25rem; color: var(--muted); }

.empty-state {
    padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
}
.empty-state__code { margin: 0 0 0.5rem; color: var(--border-strong); font-size: clamp(4rem, 3rem + 5vw, 6.5rem); font-weight: 800; line-height: 1; }
.empty-state__title { margin: 0 0 0.5rem; font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem); overflow-wrap: anywhere; }
.empty-state__message { max-width: 34rem; margin: 0 auto var(--space-5); color: var(--muted); }
.empty-state .search-form { max-width: 28rem; margin: 0 auto var(--space-5); }
.empty-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }

/* 7. Single posts & pages =================================================== */
.entry, .comments { padding: 0; }
.entry-header { margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.entry-categories { margin-bottom: 0.875rem; }
.entry-title { margin: 0 0 var(--space-4); font-size: clamp(1.875rem, 1.35rem + 2.3vw, 2.75rem); line-height: 1.18; overflow-wrap: anywhere; }
.entry-media { margin: 0 0 clamp(1.5rem, 3vw, 2.25rem); overflow: hidden; border-radius: var(--radius); background: var(--surface-muted); }
.entry-media img { display: block; width: 100%; max-height: 36rem; object-fit: cover; }

@media (min-width: 640px) {
    .entry, .comments {
        padding: clamp(1.5rem, 4vw, 3rem);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        background: var(--surface);
    }
}

.entry-content {
    max-width: var(--reading);
    color: var(--text);
    font-size: 1.0625rem;
    line-height: 1.75;
    overflow-wrap: break-word;
}
@media (min-width: 640px) {
    .entry-content { font-size: 1.125rem; }
}
.entry-content:lang(bn), :lang(bn) .entry-content { line-height: 1.85; }
.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content p, .entry-content ul, .entry-content ol, .entry-content dl { margin: 0 0 1.25em; }
.entry-content h2 { margin: 1.8em 0 0.6em; font-size: 1.5em; }
.entry-content h3 { margin: 1.6em 0 0.55em; font-size: 1.25em; }
.entry-content h4, .entry-content h5, .entry-content h6 { margin: 1.4em 0 0.5em; font-size: 1.075em; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.18em; overflow-wrap: anywhere; }
.entry-content ul, .entry-content ol { padding-left: 1.5em; }
.entry-content li + li { margin-top: 0.375em; }
.entry-content img, .entry-content video { border-radius: var(--radius-sm); }
.entry-content figure { margin: 1.75em 0; }
.entry-content figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.875rem; text-align: center; }
.entry-content blockquote { margin: 1.75em 0; padding: 0.25em 0 0.25em 1.25em; border-left: 3px solid var(--accent); color: var(--heading); font-style: italic; }
.entry-content blockquote:lang(bn), :lang(bn) .entry-content blockquote { font-style: normal; }
.entry-content blockquote > :last-child { margin-bottom: 0; }
.entry-content hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--border); }
.entry-content code, .entry-content kbd {
    padding: 0.125em 0.375em;
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--heading);
    font-family: var(--font-mono);
    font-size: 0.875em;
    overflow-wrap: anywhere;
}
.entry-content pre {
    max-width: 100%;
    margin: 1.75em 0;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    border-radius: var(--radius);
    background: #0f172a;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre;
    tab-size: 4;
}
.entry-content pre code { padding: 0; background: none; color: inherit; font-size: inherit; overflow-wrap: normal; }
.table-scroll { max-width: 100%; margin: 1.75em 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.table-scroll table { margin: 0; }
.entry-content th, .entry-content td { min-width: 7.5rem; padding: 0.625rem 0.875rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.entry-content th { background: var(--surface-muted); color: var(--heading); font-weight: 600; }
.entry-content tr:last-child td { border-bottom: 0; }
.entry-content iframe, .entry-content embed, .entry-content object, .entry-content video { display: block; max-width: 100%; }
.entry-content iframe[src*="youtube"], .entry-content iframe[src*="youtu.be"], .entry-content iframe[src*="vimeo"], .entry-content iframe[src*="dailymotion"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }

.entry-footer { margin-top: var(--space-6); padding-top: 1.25rem; border-top: 1px solid var(--border); }
.entry-tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; }
.entry-tags__label { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.tag-badge, .tag-cloud-item {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.8125rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.tag-badge:hover, .tag-cloud-item:hover, .tag-cloud-item[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }

.author-box { display: flex; align-items: flex-start; gap: var(--space-4); margin-top: var(--space-6); padding: 1.25rem; border-radius: var(--radius); background: var(--surface-muted); }
.author-box__body { min-width: 0; }
.author-box__label { margin: 0; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.author-box__name { margin: 0.125rem 0 0; color: var(--heading); font-weight: 700; }
.author-box__bio { margin: 0.5rem 0 0; font-size: 0.9375rem; overflow-wrap: anywhere; }

.post-navigation { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
@media (min-width: 640px) {
    .post-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-navigation__link--next { grid-column: 2; text-align: right; }
}
.post-navigation__link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    text-decoration: none;
}
.post-navigation__link:hover { border-color: var(--accent); }
.post-navigation__label { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.post-navigation__title { color: var(--heading); font-weight: 600; overflow-wrap: anywhere; }

/* 8. Comments =============================================================== */
.comments { margin-top: var(--space-6); }
.comments__title { margin: 0 0 1.25rem; font-size: 1.375rem; }
.comments__count { color: var(--muted); font-weight: 500; }
.comments__empty { margin: 0 0 var(--space-5); color: var(--muted); }
.comment-list { margin: 0 0 var(--space-6); padding: 0; list-style: none; }
.comment { display: flex; gap: 0.875rem; padding: 1.125rem 0; border-top: 1px solid var(--border); }
.comment:first-child { padding-top: 0; border-top: 0; }
.comment:target { border-radius: var(--radius-sm); background: var(--accent-soft); box-shadow: 0 0 0 0.75rem var(--accent-soft); }
.comment__avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-muted); color: var(--heading); font-weight: 700; }
.comment__main { flex: 1; min-width: 0; }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; margin: 0 0 0.375rem; }
.comment__author { color: var(--heading); font-weight: 600; overflow-wrap: anywhere; }
.comment__permalink { color: var(--muted); font-size: 0.8125rem; text-decoration: none; }
.comment__permalink:hover { color: var(--accent); }
.comment__text { line-height: 1.65; overflow-wrap: anywhere; }
.comment-respond { padding-top: var(--space-5); border-top: 1px solid var(--border); }
.comment-respond__title { margin: 0; font-size: 1.125rem; }
.comment-respond__note { margin: 0.25rem 0 var(--space-4); color: var(--muted); font-size: 0.9375rem; }
.comment-auth-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* 9. Sidebar & widgets ====================================================== */
.sidebar__inner { display: grid; gap: 1.25rem; }
.sidebar .widget { padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.widget-title { margin: 0 0 0.875rem; color: var(--heading); font-size: 1rem; font-weight: 700; }
.widget-list { margin: 0; padding: 0; list-style: none; }
.widget-list > li + li { border-top: 1px solid var(--border); }
.widget-list a { display: flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0.375rem 0; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.widget-list a:hover, .widget-list a[aria-current="page"], .widget-list a.active { color: var(--accent); }
.widget-list .sub-menu { margin: 0; padding-left: var(--space-4); list-style: none; }
.category-row { justify-content: space-between; }
.category-row__name { min-width: 0; }
.category-badge-count { flex: none; min-width: 1.75rem; padding: 0.125rem 0.5rem; border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--muted); font-size: 0.75rem; font-weight: 600; text-align: center; }
.widget-recent-posts__item { display: flex; align-items: center; gap: var(--space-3); padding: 0.625rem 0; }
.widget-recent-posts > li:first-child { padding-top: 0; }
.widget-recent-posts__thumb { display: block; flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-muted); }
.widget-recent-posts__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.widget-recent-posts__body { display: grid; gap: 0.125rem; min-width: 0; }
.widget-recent-posts .recent-post-link { display: block; min-height: 0; padding: 0; font-weight: 600; line-height: 1.35; }
.recent-post-meta { color: var(--muted); font-size: 0.8125rem; }
.widget-recent-comments__item { padding: 0.625rem 0; font-size: 0.9375rem; overflow-wrap: anywhere; }
.widget-recent-comments .widget-recent-comments__link { display: inline; min-height: 0; padding: 0; }
.widget-tag-cloud { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.widget-search-form { position: relative; display: flex; }
.featured-post-card { display: grid; gap: var(--space-2); }
.featured-post-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-muted); }
.featured-post-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.featured-post-card__title { margin: 0; font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.featured-post-card__title a { color: var(--heading); text-decoration: none; }
.featured-post-card__excerpt { margin: 0; color: var(--muted); font-size: 0.875rem; }
.featured-post-card__link { font-size: 0.875rem; font-weight: 600; }
.widget-image { display: block; max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.widget-image-figure { margin: 0; }
.widget-image-caption { margin-top: var(--space-2); color: var(--muted); font-size: 0.8125rem; text-align: center; }
.custom-html-widget-content { overflow-wrap: anywhere; }
.custom-html-widget-content > :last-child { margin-bottom: 0; }

/* 10. Footer ================================================================ */
.site-footer { padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.75rem; background: var(--footer-bg); color: var(--footer-text); font-size: 0.9375rem; }
.site-footer a { color: #e2e8f0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer :focus-visible { outline-color: #9fb4ff; }
.footer-widgets { display: grid; gap: var(--space-6); margin-bottom: 1.75rem; padding-bottom: var(--space-6); border-bottom: 1px solid var(--footer-line); }
@media (min-width: 640px) {
    .footer-widgets--2, .footer-widgets--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .footer-widgets--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.footer-widget-col { min-width: 0; }
.site-footer .widget { margin: 0; color: var(--footer-text); }
.site-footer .widget + .widget { margin-top: var(--space-6); }
.site-footer .widget-title { color: #fff; }
.site-footer .widget-list > li + li { border-color: var(--footer-line); }
.site-footer .widget-list a { color: var(--footer-text); }
.site-footer .widget-list a:hover { color: #fff; text-decoration: none; }
.site-footer .category-badge-count { background: rgba(148, 163, 184, 0.16); color: #e2e8f0; }
.site-footer .recent-post-meta, .site-footer .featured-post-card__excerpt, .site-footer .widget-image-caption { color: var(--footer-muted); }
.site-footer .tag-cloud-item { border-color: rgba(148, 163, 184, 0.3); background: rgba(148, 163, 184, 0.12); color: #e2e8f0; }
.site-footer .featured-post-card__title a { color: #fff; }
.site-footer .widget-search-input { border-color: #334155; background: #1e293b; color: #fff; }
.site-footer .widget-search-input::placeholder { color: var(--footer-muted); }
.site-footer .widget-search-btn { color: var(--footer-muted); }

.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4) var(--space-6); }
.footer-brand-block { min-width: 0; }
.site-footer .footer-brand { color: #fff; font-size: 1.0625rem; font-weight: 700; }
.footer-copyright { margin: 0.25rem 0 0; color: var(--footer-muted); font-size: 0.875rem; }
.footer-copyright strong { color: #e2e8f0; font-weight: 600; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.footer-menu .menu-link { display: inline-flex; align-items: center; min-height: 44px; color: #e2e8f0; }
.footer-menu .menu-link[aria-current="page"] { color: #fff; font-weight: 600; }
.footer-menu .sub-menu { display: flex; flex-wrap: wrap; gap: 0 1rem; padding-left: var(--space-3); font-size: 0.875rem; }

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

/* Both appearances use the same layout and widget semantics. */
:root { color-scheme:light; --action-bg:var(--accent); --footer-bg:#eef2f8; --footer-text:#334155; --footer-muted:#64748b; --footer-line:#cbd5e1; --footer-heading:#0f172a; }
:root[data-theme="dark"] { color-scheme:dark; --action-bg:#2563eb; --footer-bg:#070d19; --footer-text:#cbd5e1; --footer-muted:#94a3b8; --footer-line:#334155; --footer-heading:#f8fafc; }
.button--primary, .button--primary:hover { background:var(--action-bg); color:#fff; }
.button--primary:hover { filter:brightness(.92); }
input::placeholder, textarea::placeholder { color:var(--muted); opacity:1; }
input:-webkit-autofill { -webkit-text-fill-color:var(--text); box-shadow:0 0 0 1000px var(--surface) inset; }
input[type="checkbox"], input[type="radio"] { accent-color:var(--action-bg); }
.site-footer a, .footer-menu .menu-link, .footer-copyright strong, .site-footer .category-badge-count { color:var(--footer-text); }
.site-footer a:hover, .site-footer .widget-list a:hover, .site-footer .widget-title, .site-footer .featured-post-card__title a, .site-footer .footer-brand, .footer-menu .menu-link[aria-current="page"] { color:var(--footer-heading); }
.site-footer :focus-visible { outline-color:var(--accent); }
.site-footer .widget-search-input { border-color:var(--border-strong); background:var(--surface); color:var(--text); }
.site-footer .tag-cloud-item { border-color:var(--footer-line); background:var(--surface-muted); color:var(--footer-text); }
.site-footer .tag-cloud-item:hover { color:var(--footer-heading); border-color:var(--accent); }
.site-footer .widget-search-btn { color:var(--muted); }
.widget, .widget-recent-posts__body, .featured-post-card, .header-right-widgets { min-width:0; }
.widget-search-input { min-width:0; }
.custom-html-widget-content img, .custom-html-widget-content video, .custom-html-widget-content iframe { max-width:100%; }
.custom-html-widget-content pre { max-width:100%; overflow-x:auto; }
.custom-html-widget-content table { display:block; max-width:100%; overflow-x:auto; }
.widget-nav-menu .sub-menu { overflow-wrap:anywhere; }
@media(max-width:400px) { .header-bar { gap:10px; } .site-branding { min-width:0; } .site-custom-logo { max-width:calc(100vw - 110px); } }

:root { --accent:var(--brand-accent, #3056d3); --footer-muted:#475569; }
:root[data-theme="dark"] { --accent:#60a5fa; --footer-muted:#94a3b8; }
@supports(color:color-mix(in srgb, #000, #fff)) {
    :root[data-theme="dark"] { --accent:color-mix(in srgb, var(--brand-accent, #3056d3) 60%, #fff); }
}

:root { --cms-btt-hover-bg:var(--action-bg); }
