/* ==========================================================
   ব্লগ — স্টাইল
   রং: গাঢ় বেগুনি (প্রধান) + কমলা (জোর)। লাইট ও ডার্ক দুই থিম।
   ========================================================== */

:root {
    --bg: #f7f5fa;
    --surface: #ffffff;
    --surface-2: #f0ecf6;
    --text: #1d1730;
    --muted: #655e7a;
    --primary: #4c2a85;
    --on-primary: #ffffff;
    --accent: #c9490c;
    --border: #e3dded;
    --shadow: 0 1px 2px rgba(40, 20, 80, .06), 0 8px 24px -12px rgba(40, 20, 80, .18);
    --shadow-hover: 0 2px 4px rgba(40, 20, 80, .08), 0 18px 36px -14px rgba(40, 20, 80, .28);
    --radius: 14px;
    --radius-sm: 8px;
    --font-body: 'Hind Siliguri', 'Noto Sans Bengali', system-ui, sans-serif;
    --font-display: 'Tiro Bangla', 'Hind Siliguri', serif;
    --gutter: clamp(16px, 4vw, 32px);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #130f1d;
        --surface: #1c1729;
        --surface-2: #261f38;
        --text: #ece8f5;
        --muted: #a8a1bd;
        --primary: #b79bf5;
        --on-primary: #1a1030;
        --accent: #ff9558;
        --border: #2f2943;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
        --shadow-hover: 0 2px 4px rgba(0, 0, 0, .5), 0 18px 36px -14px rgba(0, 0, 0, .7);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #130f1d;
    --surface: #1c1729;
    --surface-2: #261f38;
    --text: #ece8f5;
    --muted: #a8a1bd;
    --primary: #b79bf5;
    --on-primary: #1a1030;
    --accent: #ff9558;
    --border: #2f2943;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .5), 0 18px 36px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
p,
ul,
ol {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.wrap {
    width: min(100% - 2 * var(--gutter), 1200px);
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    background: var(--primary);
    color: var(--on-primary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: top .2s;
}

.skip:focus {
    top: 12px;
}

/* ---------- হেডার ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-header__bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-block: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--on-primary);
    font-family: var(--font-display);
    font-size: 1.7rem;
    line-height: 1;
    border-radius: 12px 12px 12px 4px;
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand__text strong {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 400;
}

.brand__text small {
    color: var(--muted);
    font-size: .8rem;
}

.search {
    position: relative;
    flex: 1;
    max-width: 460px;
    margin-left: auto;
}

.search input {
    width: 100%;
    height: 44px;
    padding: 0 48px 0 18px;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: .98rem;
}

.search input::placeholder {
    color: var(--muted);
}

.search input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
}

.search button {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: var(--on-primary);
    border: 0;
    border-radius: 50%;
}

.menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    place-items: center;
    background: var(--surface-2);
    border: 0;
    border-radius: 12px;
}

.cat-nav {
    border-top: 1px solid var(--border);
}

.cat-nav__list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-block: 8px;
}

.cat-nav__list::-webkit-scrollbar {
    display: none;
}

.cat-nav a {
    flex-shrink: 0;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: .96rem;
    font-weight: 500;
    color: var(--muted);
    transition: background .18s, color .18s;
}

.cat-nav a:hover {
    background: var(--surface-2);
    color: var(--text);
}

.cat-nav a.is-active {
    background: var(--primary);
    color: var(--on-primary);
}

/* ---------- কভার (ছবি না থাকলে গ্রেডিয়েন্ট) ---------- */
.cover {
    position: relative;
    display: block;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: var(--primary);
}

.cover__glyph {
    position: absolute;
    right: 6%;
    bottom: -12%;
    font-family: var(--font-display);
    font-size: clamp(7rem, 18vw, 13rem);
    line-height: 1;
    color: rgba(255, 255, 255, .16);
    pointer-events: none;
    user-select: none;
}

/* ---------- স্লাইডার ---------- */
.slider {
    position: relative;
    margin-top: 24px;
    overflow: hidden;
    height: clamp(320px, 44vw, 470px);
    border-radius: var(--radius);
    background: #1b1030;
    box-shadow: var(--shadow);
    isolation: isolate;
}

.slider__track {
    position: absolute;
    inset: 0;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .7s ease, visibility .7s;
}

.slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.slide__img {
    position: absolute;
    inset: 0;
    transform: scale(1.04);
    transition: transform 6s ease-out;
}

.slide.is-active .slide__img {
    transform: scale(1);
}

.slide__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(14, 8, 28, .88) 0%, rgba(14, 8, 28, .45) 45%, rgba(14, 8, 28, .05) 100%);
}

.slide__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: clamp(20px, 4vw, 48px) clamp(20px, 4vw, 56px) clamp(36px, 5vw, 56px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    color: #fff;
    max-width: 820px;
}

.slide__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.5rem, 3.6vw, 2.6rem);
    line-height: 1.3;
    text-wrap: balance;
}

.slide__title a {
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
    transition: background-size .3s;
}

.slide__title a:hover {
    background-size: 100% 2px;
}

.slide__text {
    color: rgba(255, 255, 255, .86);
    font-size: clamp(.95rem, 1.6vw, 1.1rem);
    max-width: 60ch;
}

.slider__nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
    backdrop-filter: blur(6px);
    transition: background .18s;
}

.slider__nav:hover {
    background: rgba(255, 255, 255, .32);
}

.slider__nav--prev {
    left: 16px;
}

.slider__nav--next {
    right: 16px;
}

.slider__dots {
    position: absolute;
    right: clamp(16px, 3vw, 40px);
    bottom: 20px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.slider__dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .45);
    transition: width .25s, background .25s;
}

.slider__dots button.is-active {
    width: 30px;
    background: #fff;
}

.slider__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    z-index: 3;
    background: rgba(255, 255, 255, .15);
}

.slider__bar span {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
}

.slider.is-playing .slider__bar span {
    animation: progress var(--slide-ms, 5500ms) linear forwards;
}

@keyframes progress {
    to {
        transform: scaleX(1);
    }
}

/* ---------- লেআউট ---------- */
.content {
    padding-block: 36px 64px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.section-head__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.4rem, 2.4vw, 1.8rem);
    line-height: 1.3;
    position: relative;
}

.section-head__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -14px;
    width: 56px;
    height: 2px;
    background: var(--accent);
}

.section-head__count {
    color: var(--muted);
    font-size: .92rem;
}

/* ---------- কার্ড ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.grid--3 {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    margin-top: 28px;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card__cover {
    aspect-ratio: 16 / 10;
}

.card__cover .cover__glyph {
    font-size: 7rem;
}

.card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 20px 20px;
    flex: 1;
}

.card__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.3rem;
    line-height: 1.4;
    text-wrap: balance;
}

.card__title a:hover {
    color: var(--primary);
}

.card__text {
    color: var(--muted);
    font-size: .98rem;
    line-height: 1.65;
}

.card .meta {
    margin-top: auto;
    padding-top: 6px;
}

.chip {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--primary);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.7;
    letter-spacing: 0;
    transition: background .18s;
}

.chip:hover {
    background: var(--primary);
    color: var(--on-primary);
}

.chip--light {
    background: rgba(255, 255, 255, .18);
    color: #fff;
    backdrop-filter: blur(4px);
}

.chip--light:hover {
    background: #fff;
    color: #1b1030;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    color: var(--muted);
    font-size: .86rem;
}

.meta i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: .6;
}

.meta--light {
    color: rgba(255, 255, 255, .8);
}

/* ---------- পেজিনেশন ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pg {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    display: inline-grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 500;
    transition: background .18s, border-color .18s;
}

a.pg:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pg.is-current {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
}

.pg--gap {
    background: none;
    border: 0;
    min-width: 20px;
    padding: 0;
}

/* ---------- একক লেখা ---------- */
.crumbs {
    display: flex;
    gap: 8px;
    margin: 22px auto 18px;
    width: min(100%, 820px);
    color: var(--muted);
    font-size: .9rem;
}

.crumbs a:hover {
    color: var(--primary);
}

.article {
    width: min(100%, 820px);
    margin: 0 auto;
    padding-block: 8px 24px;
}

.article__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.article__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.8rem, 4.2vw, 2.9rem);
    line-height: 1.3;
    text-wrap: balance;
}

.article__lead {
    font-size: 1.2rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 62ch;
}

.article__cover {
    aspect-ratio: 16 / 8;
    border-radius: var(--radius);
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.prose {
    max-width: 68ch;
    font-size: 1.15rem;
    line-height: 1.95;
}

.prose p+p {
    margin-top: 1.3em;
}

.related {
    margin-top: 40px;
    padding-bottom: 64px;
}

/* ---------- খালি অবস্থা ---------- */
.empty {
    padding: 56px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted);
}

.empty__title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 6px;
}

.empty a {
    color: var(--primary);
    text-decoration: underline;
}

/* ---------- ফুটার ---------- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding-top: 48px;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.2fr 1fr;
    gap: 32px;
}

.site-footer__brand {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--primary);
}

.site-footer__about {
    color: var(--muted);
    max-width: 40ch;
    margin-top: 6px;
}

.site-footer__head {
    font-weight: 600;
    margin-bottom: 10px;
}

.site-footer li a {
    color: var(--muted);
}

.site-footer li a:hover {
    color: var(--primary);
}

.site-footer li {
    line-height: 2;
}

.site-footer__copy {
    margin-top: 36px;
    padding-block: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: .88rem;
}

/* ---------- রেসপন্সিভ ---------- */
@media (max-width: 720px) {
    .brand__text small {
        display: none;
    }

    .site-header__bar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .menu-btn {
        display: grid;
    }

    .search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
        margin-left: 0;
    }

    .cat-nav {
        display: none;
    }

    .cat-nav.is-open {
        display: block;
    }

    .cat-nav__list {
        flex-wrap: wrap;
        overflow: visible;
    }

    .slider__nav {
        display: none;
    }

    .slider__dots {
        left: 20px;
        right: auto;
        bottom: 14px;
    }

    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer__grid> :first-child {
        grid-column: 1 / -1;
    }
}

/* ---------- উন্নত ফুটার ---------- */
.fstats {
    list-style: none;
    margin: 0 0 36px;
    padding: 0 0 28px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.fstats li {
    text-align: center;
    line-height: 1.3;
}

.fstats b {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 4vw, 2rem);
    color: var(--primary);
}

.fstats span {
    color: var(--muted);
    font-size: .88rem;
}

.site-footer__grid>* {
    min-width: 0;
}

.site-footer small {
    color: var(--muted);
}

.fcontact {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: .92rem;
}

.fcontact li {
    line-height: 1.8;
}

.fsocial {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.fsocial a {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .86rem;
    color: var(--muted);
    transition: color .18s, border-color .18s;
}

.fsocial a:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.ftags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ftags a {
    font-size: .84rem;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
}

.ftags a:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.site-footer__copy {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}

.totop {
    color: var(--muted);
}

.totop:hover {
    color: var(--primary);
}

@media (max-width: 900px) {
    .fstats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- রেজিস্ট্রেশন ---------- */
.seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 18px 0;
}

.seg__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    transition: border-color .18s, background .18s;
}

.seg__item small {
    color: var(--muted);
}

.seg__item:hover {
    border-color: var(--primary);
}

.seg__item.is-on {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
}

.opt {
    color: var(--muted);
    font-weight: 400;
    font-size: .88em;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- বুকমার্ক বোতাম ---------- */
.like.bm.is-liked svg {
    fill: var(--primary);
}

.like.bm.is-liked {
    border-color: var(--primary);
    color: var(--primary);
}

.actions-bar {
    flex-wrap: wrap;
}

/* ---------- মন্তব্য ---------- */
.comments {
    max-width: 760px;
    margin: 40px auto;
}

.cform {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.cform__avatar,
.comment__avatar {
    flex: none;
    width: 40px;
    height: 40px;
}

.cform__main {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 8px;
    justify-items: start;
}

.cform textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    line-height: 1.7;
    resize: vertical;
}

.cform textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.cform--guest {
    flex-wrap: wrap;
    align-items: center;
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: 12px;
}

.cform--guest p {
    flex: 1 1 100%;
    margin: 0;
    color: var(--muted);
}

.cform--reply {
    margin: 0 0 18px 52px;
}

.cform--reply[hidden] {
    display: none;
}

.field-error {
    color: #c0392b;
    font-size: .9rem;
    margin: 0;
}

.comment {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    scroll-margin-top: 90px;
}

.comment--reply {
    margin-left: 52px;
}

.comment:target {
    background: color-mix(in srgb, var(--primary) 7%, transparent);
}

.comment__main {
    min-width: 0;
    flex: 1;
}

.comment__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.comment__head time {
    color: var(--muted);
    font-size: .84rem;
}

.comment__body {
    margin-top: 4px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.comment__acts {
    margin-top: 4px;
    display: flex;
    gap: 14px;
}

.linkbtn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--muted);
    font: inherit;
    font-size: .88rem;
    cursor: pointer;
}

.linkbtn:hover {
    color: var(--primary);
}

.linkbtn--danger:hover {
    color: #c0392b;
}

.chip--mini {
    font-size: .72rem;
    padding: 1px 8px;
}

@media (max-width: 560px) {

    .comment--reply,
    .cform--reply {
        margin-left: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }

    .slider.is-playing .slider__bar span {
        animation: none;
    }
}

/* ---------- অ্যাডমিন ---------- */
.admin-wrap {
    width: min(100% - 2 * var(--gutter), 1000px);
    margin: 32px auto 64px;
}

.admin-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.admin-bar h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.8rem;
}

.admin-bar nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    background: var(--primary);
    color: var(--on-primary);
    border: 1px solid var(--primary);
    border-radius: 10px;
    font-weight: 600;
    transition: filter .18s, transform .18s;
}

.btn:hover {
    filter: brightness(1.1);
}

.btn:active {
    transform: translateY(1px);
}

.btn--ghost {
    background: transparent;
    color: var(--primary);
}

.btn--danger {
    background: transparent;
    color: #b91c1c;
    border-color: #b91c1c;
    min-height: 36px;
    padding: 0 14px;
}

.btn--sm {
    min-height: 36px;
    padding: 0 14px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.table-scroll {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .96rem;
}

.table th,
.table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table th {
    position: sticky;
    top: 0;
    background: var(--surface-2);
    font-weight: 600;
    font-size: .86rem;
    color: var(--muted);
}

.table tbody tr:hover {
    background: var(--surface-2);
}

.table .actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.badge {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    font-size: .8rem;
    font-weight: 600;
}

.badge--on {
    background: var(--accent);
    color: #fff;
}

.form {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 6px;
}

.field label {
    font-weight: 600;
}

.field small {
    color: var(--muted);
}

.field input[type=text],
.field input[type=password],
.field select,
.field textarea,
.field input[type=file] {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
}

.field textarea {
    min-height: 260px;
    line-height: 1.7;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    background: #fde8e8;
    color: #7f1d1d;
    border: 1px solid #f5b5b5;
}

.alert--ok {
    background: #e6f6ec;
    color: #14532d;
    border-color: #a7dbb9;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .alert {
        background: #3a1517;
        color: #fecaca;
        border-color: #7f1d1d;
    }

    :root:not([data-theme="light"]) .alert--ok {
        background: #12301f;
        color: #bbf7d0;
        border-color: #166534;
    }
}

.login-box {
    width: min(100% - 32px, 400px);
    margin: 12vh auto;
}

.preview-img {
    max-width: 220px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

:root[data-theme="dark"] .alert {
    background: #3a1517;
    color: #fecaca;
    border-color: #7f1d1d;
}

:root[data-theme="dark"] .alert--ok {
    background: #12301f;
    color: #bbf7d0;
    border-color: #166534;
}

:root[data-theme="dark"] .alert--warn {
    background: #3a2d10;
    color: #fde68a;
    border-color: #854d0e;
}

/* ---------- হেডার অ্যাকশন, থিম বোতাম ---------- */
.hdr-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.hdr-link {
    font-weight: 500;
    padding: 6px 8px;
    border-radius: 8px;
    color: var(--muted);
}

.hdr-link:hover {
    color: var(--primary);
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: var(--surface-2);
    border: 0;
    border-radius: 12px;
    color: var(--text);
}

.icon-btn:hover {
    background: var(--border);
}

.icon-btn .i-sun {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon-btn .i-sun {
        display: block;
    }

    :root:not([data-theme="light"]) .icon-btn .i-moon {
        display: none;
    }
}

:root[data-theme="dark"] .icon-btn .i-sun {
    display: block;
}

:root[data-theme="dark"] .icon-btn .i-moon {
    display: none;
}

/* ---------- লাইভ সার্চ ড্রপডাউন ---------- */
.suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 60;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    overflow: hidden;
}

.suggest a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 10px 16px;
    line-height: 1.5;
}

.suggest a:hover,
.suggest a:focus-visible {
    background: var(--surface-2);
}

.suggest small {
    color: var(--muted);
    flex-shrink: 0;
}

/* ---------- ট্রেন্ডিং ---------- */
.trending {
    margin-top: 32px;
    padding: 22px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.trending__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.3rem;
    margin-bottom: 14px;
}

.trending__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px 28px;
}

.trending__list li {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 12px;
    align-items: start;
}

.trending__rank {
    font-family: var(--font-display);
    font-size: 2.4rem;
    line-height: 1;
    color: var(--accent);
    opacity: .9;
}

.trending__list a {
    font-weight: 500;
    line-height: 1.5;
    display: block;
}

.trending__list a:hover {
    color: var(--primary);
}

.trending__list small {
    color: var(--muted);
    font-size: .82rem;
}

.loadmore {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}

.loadmore[hidden] {
    display: none;
}

/* ---------- রিডিং প্রোগ্রেস, লাইক, লেখক বক্স ---------- */
.read-progress {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    z-index: 70;
    background: transparent;
    pointer-events: none;
}

.read-progress span {
    display: block;
    height: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
}

.actions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.like {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-weight: 600;
    transition: border-color .18s, color .18s, transform .18s;
}

.like svg {
    fill: transparent;
    transition: fill .18s, transform .25s cubic-bezier(.3, 1.6, .5, 1);
}

.like:hover {
    border-color: var(--accent);
}

.like.is-liked {
    border-color: var(--accent);
    color: var(--accent);
}

.like.is-liked svg {
    fill: var(--accent);
    transform: scale(1.15);
}

.like b {
    font-variant-numeric: tabular-nums;
}

.author-box {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-top: 28px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.author-box__avatar {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--on-primary);
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.author-box__name {
    font-weight: 600;
}

.author-box__bio {
    color: var(--muted);
    line-height: 1.6;
}

/* ---------- অথ পেজ (লগইন, রেজিস্ট্রেশন) ---------- */
.auth-wrap {
    width: min(100% - 32px, 480px);
    margin: 48px auto 72px;
}

.auth-wrap .panel {
    padding: 28px;
}

.auth-wrap h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.7rem;
    margin-bottom: 4px;
}

.auth-wrap .lead {
    color: var(--muted);
    margin-bottom: 20px;
}

.auth-alt {
    margin-top: 18px;
    text-align: center;
    color: var(--muted);
}

.auth-alt a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert--warn {
    background: #fff4d6;
    color: #7a4b00;
    border-color: #f0d28a;
}

.field .err {
    color: #b91c1c;
    font-size: .9rem;
}

.status {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    background: var(--surface-2);
}

.status--pending {
    background: #fff4d6;
    color: #7a4b00;
}

.status--approved {
    background: #e6f6ec;
    color: #14532d;
}

.status--rejected {
    background: #fde8e8;
    color: #7f1d1d;
}

:root[data-theme="dark"] .status--pending {
    background: #3a2d10;
    color: #fde68a;
}

:root[data-theme="dark"] .status--approved {
    background: #12301f;
    color: #bbf7d0;
}

:root[data-theme="dark"] .status--rejected {
    background: #3a1517;
    color: #fecaca;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .alert--warn {
        background: #3a2d10;
        color: #fde68a;
        border-color: #854d0e;
    }

    :root:not([data-theme="light"]) .status--pending {
        background: #3a2d10;
        color: #fde68a;
    }

    :root:not([data-theme="light"]) .status--approved {
        background: #12301f;
        color: #bbf7d0;
    }

    :root:not([data-theme="light"]) .status--rejected {
        background: #3a1517;
        color: #fecaca;
    }
}

/* ড্যাশবোর্ড */
.dash {
    padding-block: 32px 64px;
}

.dash__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.dash__head h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.8rem;
}

@media (max-width: 720px) {
    .hdr-actions {
        margin-left: auto;
        gap: 6px;
    }

    .hdr-actions .btn--sm {
        padding: 0 12px;
    }

    .hdr-link {
        padding: 6px 4px;
    }

    .icon-btn,
    .menu-btn {
        width: 38px;
        height: 38px;
    }

    .menu-btn {
        margin-left: 0;
    }

    .trending {
        padding: 18px;
    }
}

/* ==========================================================
   নতুন: এডিটর, ফর্ম, স্ট্যাটাস, ট্যাগ, লেখক পেজ, ড্যাশবোর্ড
   ========================================================== */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hint {
    color: var(--muted);
    font-size: .92rem;
}

.note {
    color: #b45309;
}

.lbl {
    font-weight: 600;
}

.settings {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px 18px;
    display: grid;
    gap: 16px;
    margin: 0;
    min-width: 0;
}

.settings legend {
    padding: 0 8px;
    font-weight: 600;
}

.linkbox {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    font-size: .9rem;
}

.dash__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-banner {
    margin-top: 20px;
}

/* পোস্টের অবস্থা ব্যাজ */
.status--draft {
    background: var(--surface-2);
    color: var(--muted);
}

.status--scheduled {
    background: #e0ecff;
    color: #1e3a8a;
}

:root[data-theme="dark"] .status--scheduled {
    background: #1b2a4a;
    color: #bfdbfe;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .status--scheduled {
        background: #1b2a4a;
        color: #bfdbfe;
    }
}

.status--published {
    background: #e6f6ec;
    color: #14532d;
}

:root[data-theme="dark"] .status--published {
    background: #12301f;
    color: #bbf7d0;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .status--published {
        background: #12301f;
        color: #bbf7d0;
    }
}

/* রিচ টেক্সট এডিটর */
.rte {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    overflow: hidden;
}

.rte:focus-within {
    border-color: var(--primary);
}

.rte textarea {
    width: 100%;
    min-height: 260px;
    padding: 12px 14px;
    background: var(--bg);
    color: var(--text);
    border: 0;
    font: inherit;
}

.rte__bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 5;
}

.rte__btn {
    min-height: 34px;
    padding: 0 10px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .88rem;
}

.rte__btn:hover {
    border-color: var(--primary);
}

.rte__btn.is-on {
    background: var(--primary);
    color: var(--on-primary);
    border-color: var(--primary);
}

.rte__btn--b {
    font-weight: 800;
}

.rte__btn--i {
    font-style: italic;
}

.rte__btn--u {
    text-decoration: underline;
}

.rte__sep {
    width: 1px;
    background: var(--border);
    margin: 4px 4px;
}

.rte__area {
    min-height: 320px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 16px 18px;
    outline: none;
    max-width: none;
    background: var(--bg);
}

.rte__area:empty::before {
    content: 'এখানে লিখুন…';
    color: var(--muted);
}

.rte__status {
    padding: 4px 12px;
    min-height: 1.6em;
    font-size: .86rem;
    color: var(--muted);
    background: var(--surface-2);
}

/* লেখার ভেতরের উপাদান */
.prose h2,
.prose h3,
.prose h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.4;
    margin: 1.6em 0 .5em;
    text-wrap: balance;
}

.prose h2 {
    font-size: 1.6rem;
}

.prose h3 {
    font-size: 1.3rem;
}

.prose h4 {
    font-size: 1.1rem;
}

.prose p+p,
.prose p+ul,
.prose p+ol,
.prose ul+p,
.prose ol+p {
    margin-top: 1.2em;
}

.prose ul,
.prose ol {
    padding-left: 1.4em;
    margin-block: 1em;
}

.prose ul {
    list-style: disc;
}

.prose ol {
    list-style: decimal;
}

.prose li+li {
    margin-top: .35em;
}

.prose blockquote {
    margin: 1.4em 0;
    padding: 6px 0 6px 20px;
    border-left: 3px solid var(--accent);
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 1.15em;
}

.prose a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.4em auto;
}

.prose hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2em 0;
}

.prose pre,
.prose code {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: .92em;
    background: var(--surface-2);
    border-radius: 6px;
}

.prose code {
    padding: 1px 6px;
}

.prose pre {
    padding: 14px;
    overflow-x: auto;
}

/* ট্যাগ */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tagcloud--post {
    margin-top: 28px;
}

.tag {
    padding: 3px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .9rem;
    color: var(--muted);
    transition: border-color .18s, color .18s, background .18s;
}

.tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface-2);
}

/* লেখক */
.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.avatar--lg {
    width: 88px;
    height: 88px;
}

.avatar--init,
.author-box__avatar--init,
.author-hero__avatar--init {
    display: grid;
    place-items: center;
    background: var(--primary);
    color: var(--on-primary);
    font-family: var(--font-display);
    font-size: 1.6rem;
}

.author-box__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-box__name a:hover {
    color: var(--primary);
}

.author-box__more {
    display: inline-block;
    margin-top: 6px;
    color: var(--primary);
    font-weight: 500;
}

.author-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    margin-top: 28px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.author-hero__avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-hero__avatar--init {
    font-size: 3rem;
}

.author-hero__name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    line-height: 1.3;
}

.author-hero__bio {
    color: var(--muted);
    max-width: 60ch;
    margin-top: 4px;
}

.author-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin-top: 12px;
    color: var(--muted);
    font-size: .94rem;
}

.author-hero__stats b {
    color: var(--text);
    font-size: 1.15rem;
}

.avatar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.meta a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* অ্যাডমিন ট্যাব, ইনলাইন ফেরত ফর্ম */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.tab {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: .92rem;
}

.tab b {
    font-weight: 600;
    color: var(--muted);
    margin-left: 4px;
}

.tab.is-active {
    background: var(--primary);
    color: var(--on-primary);
    border-color: var(--primary);
}

.tab.is-active b {
    color: inherit;
}

.inline-reject {
    display: flex;
    gap: 6px;
}

.inline-reject input {
    width: 130px;
    padding: 0 10px;
    min-height: 36px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    font-size: .88rem;
}

/* অ্যাডমিন ড্যাশবোর্ড */
.admin-wrap {
    width: min(100% - 2 * var(--gutter), 1200px);
}

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .18s, border-color .18s;
}

a.tile:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.tile__n {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.tile__l {
    color: var(--muted);
    font-size: .88rem;
}

.tile--alert {
    border-color: var(--accent);
}

.tile--alert .tile__n {
    color: var(--accent);
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 18px;
}

.panel__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.25rem;
    margin-bottom: 14px;
}

.plain-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plain-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.plain-list li>div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.plain-list small {
    color: var(--muted);
}

.bars--h {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bars--h li {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(80px, 1fr) auto;
    gap: 12px;
    align-items: center;
    font-size: .94rem;
}

.bars--h li> :first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.bars--h a:hover {
    color: var(--primary);
}

.bars--h b {
    font-variant-numeric: tabular-nums;
    min-width: 3ch;
    text-align: right;
}

.bars__track {
    height: 10px;
    background: var(--surface-2);
    border-radius: 999px;
    overflow: hidden;
}

.bars__fill {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
}

.bars--v {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 190px;
    padding-top: 22px;
}

.bars__col {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-width: 0;
}

.bars__bar {
    display: block;
    width: 100%;
    max-width: 44px;
    background: var(--primary);
    border-radius: 8px 8px 2px 2px;
    min-height: 3px;
}

.bars__val {
    font-size: .84rem;
    font-variant-numeric: tabular-nums;
}

.bars__lbl {
    font-size: .8rem;
    color: var(--muted);
}

@media (max-width: 720px) {
    .rte__bar {
        gap: 3px;
    }

    .rte__btn {
        padding: 0 8px;
    }

    .author-hero {
        padding: 20px;
        gap: 16px;
    }

    .dash-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .bars--h li {
        grid-template-columns: minmax(0, 1fr) 70px auto;
    }
}

.field {
    align-content: start;
}

.bars__lbl {
    white-space: nowrap;
}

.cform__avatar,
.comment__avatar {
    display: grid;
    place-items: center;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    object-fit: cover;
}

.brand__logo {
    display: block;
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.seg[hidden] {
    display: none
}