/* ==========================================================================
   Mirol Blog — front-end design system
   RTL-first, light/dark, no framework dependency.
   ========================================================================== */

@font-face {
    font-family: "Vazirmatn";
    src: url("../../font/vazirmatn/Vazirmatn-wght.woff2") format("woff2-variations"),
         url("../../font/vazirmatn/Vazirmatn-wght.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
    --brand-1: #4a55a2;
    --brand-2: #e0559a;
    --brand-grad: linear-gradient(120deg, var(--brand-1) 0%, #8a58a0 55%, var(--brand-2) 100%);

    --bg: #f7f7fa;
    --surface: #ffffff;
    --surface-2: #f0f0f5;
    --text: #15161f;
    --text-2: #3c3e4f;
    --muted: #6b6e82;
    --border: #e6e6ee;
    --accent: #4a55a2;
    --accent-soft: rgba(74, 85, 162, .09);
    --pink-soft: rgba(224, 85, 154, .10);
    --success: #12805c;
    --success-soft: rgba(18, 128, 92, .10);
    --danger: #c0344d;
    --danger-soft: rgba(192, 52, 77, .09);

    --shadow-sm: 0 1px 2px rgba(20, 22, 40, .05);
    --shadow-md: 0 8px 24px -10px rgba(20, 22, 40, .14), 0 2px 6px rgba(20, 22, 40, .04);
    --shadow-lg: 0 24px 60px -24px rgba(40, 30, 90, .28);

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;

    --container: 1200px;
    --gutter: 24px;
    --header-h: 68px;

    --font: "Vazirmatn", "IRANSans", Tahoma, system-ui, sans-serif;
    --ease: cubic-bezier(.2, .7, .2, 1);

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0c0d14;
        --surface: #14151f;
        --surface-2: #1b1d2a;
        --text: #ededf4;
        --text-2: #c9cad8;
        --muted: #9597ab;
        --border: #252737;
        --accent: #9aa4f0;
        --accent-soft: rgba(154, 164, 240, .12);
        --pink-soft: rgba(224, 85, 154, .16);
        --success: #4fd1a1;
        --success-soft: rgba(79, 209, 161, .12);
        --danger: #ff7a90;
        --danger-soft: rgba(255, 122, 144, .12);
        --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .6);
        --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, .8);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #0c0d14;
    --surface: #14151f;
    --surface-2: #1b1d2a;
    --text: #ededf4;
    --text-2: #c9cad8;
    --muted: #9597ab;
    --border: #252737;
    --accent: #9aa4f0;
    --accent-soft: rgba(154, 164, 240, .12);
    --pink-soft: rgba(224, 85, 154, .16);
    --success: #4fd1a1;
    --success-soft: rgba(79, 209, 161, .12);
    --danger: #ff7a90;
    --danger-soft: rgba(255, 122, 144, .12);
    --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, .8);
    color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.85;
    color: var(--text);
    background: var(--bg);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.45; font-weight: 800; color: var(--text); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

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

::selection { background: var(--brand-2); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.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-link {
    position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
    background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-sm);
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container--narrow { max-width: calc(760px + var(--gutter) * 2); }

.i { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.15em; }
.i.flip { transform: scaleX(-1); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 18px; border-radius: 999px;
    font-size: 14px; font-weight: 600; white-space: nowrap;
    border: 1px solid transparent; cursor: pointer;
    transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .2s, color .2s;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(224, 85, 154, .55); }
.btn--primary:hover { box-shadow: 0 12px 26px -8px rgba(224, 85, 154, .7); transform: translateY(-1px); }

.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); }

.btn--icon { width: 42px; padding: 0; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn--sm.btn--icon { width: 36px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s, background-color .25s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.site-header__inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand__logo {
    width: 38px; height: 38px; border-radius: 11px; background: var(--surface);
    border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden;
}
.brand__logo img { width: 52px; max-width: none; }
.brand__text small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); line-height: 1.2; }
.brand__text span { display: block; line-height: 1.3; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--text-2);
    transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 700; background: var(--accent-soft); }

.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }

.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .i-sun { display: inline-block; }
    :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

.menu-toggle { display: none; }

.mobile-nav {
    display: none; border-top: 1px solid var(--border); background: var(--bg);
    padding: 12px var(--gutter) 20px;
}
.mobile-nav a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 4px; border-bottom: 1px solid var(--border); font-weight: 600;
}
.mobile-nav .btn { margin-top: 16px; width: 100%; }
.site-header.is-open .mobile-nav { display: block; }

/* ---------- Search overlay ---------- */
.search-overlay {
    position: fixed; inset: 0; z-index: 80; display: none;
    background: rgba(10, 10, 20, .45);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    padding: 12vh var(--gutter) 0;
}
.search-overlay.is-open { display: block; animation: fade .2s var(--ease); }
.search-panel {
    max-width: 640px; margin-inline: auto; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    padding: 10px; animation: rise .25s var(--ease);
}
.search-field { display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.search-field .i { color: var(--muted); width: 22px; height: 22px; }
.search-field input {
    flex: 1; height: 56px; border: 0; background: transparent; outline: none; font-size: 18px;
}
.search-hint { padding: 10px 14px 6px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }
kbd {
    font-family: inherit; font-size: 12px; padding: 1px 7px; border-radius: 6px;
    border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Hero / page heads ---------- */
.hero { position: relative; padding: 56px 0 28px; overflow: hidden; }
.hero::before, .page-head::before {
    content: ""; position: absolute; inset: -40% -10% auto; height: 520px; z-index: -1;
    background:
        radial-gradient(40% 60% at 80% 30%, rgba(74, 85, 162, .20), transparent 70%),
        radial-gradient(35% 55% at 15% 20%, rgba(224, 85, 154, .16), transparent 70%);
    filter: blur(10px);
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700; color: var(--accent);
    padding: 5px 12px 5px 14px; border-radius: 999px; background: var(--accent-soft);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px var(--pink-soft); }

.hero__title { font-size: clamp(30px, 4.4vw, 50px); font-weight: 900; letter-spacing: -.5px; margin-top: 18px; line-height: 1.35; }
.hero__title .grad, .grad {
    background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { margin-top: 14px; font-size: 17px; color: var(--muted); max-width: 620px; }

.page-head { position: relative; padding: 52px 0 36px; overflow: hidden; }
.page-head__title { font-size: clamp(28px, 3.6vw, 42px); font-weight: 900; margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head__desc { margin-top: 12px; color: var(--muted); max-width: 700px; font-size: 16.5px; }
.page-head__meta { margin-top: 18px; font-size: 14px; color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }

.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .i { width: 14px; height: 14px; opacity: .6; }

/* ---------- Chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.chips--scroll::-webkit-scrollbar { display: none; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; flex: none;
    height: 36px; padding: 0 14px; border-radius: 999px;
    font-size: 13.5px; font-weight: 600; color: var(--text-2);
    background: var(--surface); border: 1px solid var(--border);
    transition: border-color .2s, color .2s, background-color .2s;
}
.chip:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip__count { font-size: 11.5px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 0 7px; line-height: 20px; }
.chip.is-active .chip__count { background: rgba(255, 255, 255, .18); color: inherit; }
.chip--sm { height: 30px; font-size: 12.5px; padding: 0 12px; }

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 700; color: var(--accent);
    background: var(--accent-soft); padding: 3px 11px; border-radius: 999px;
    transition: background-color .2s;
}
a.badge:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }

/* ---------- Layout sections ---------- */
.section { padding: 28px 0 56px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-title { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ""; width: 6px; height: 22px; border-radius: 4px; background: var(--brand-grad); }
.section-sub { font-size: 14px; color: var(--muted); }

.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }

/* ---------- Featured ---------- */
.featured { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; margin-top: 32px; }

.feature-card {
    position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden;
    min-height: 460px; background: var(--surface-2); isolation: isolate; color: #fff;
}
.feature-card__media { position: absolute; inset: 0; z-index: -2; }
.feature-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.feature-card::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(to top, rgba(8, 8, 18, .92) 0%, rgba(8, 8, 18, .55) 40%, rgba(8, 8, 18, .05) 75%);
}
.feature-card:hover .feature-card__media img { transform: scale(1.04); }
.feature-card__body { position: absolute; inset: auto 0 0 0; padding: 32px; }
.feature-card__title { color: #fff; font-size: clamp(22px, 2.6vw, 32px); font-weight: 900; margin-top: 14px; line-height: 1.5; }
.feature-card__excerpt { margin-top: 10px; color: rgba(255, 255, 255, .78); font-size: 15px; max-width: 620px; }
.feature-card .badge { background: rgba(255, 255, 255, .16); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.feature-card .meta { color: rgba(255, 255, 255, .72); margin-top: 16px; }

.featured__list { display: flex; flex-direction: column; gap: 14px; }
.mini-card {
    display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 16px; align-items: center;
    padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
    transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
    flex: 1;
}
.mini-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: transparent; }
.mini-card__media { aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.mini-card__media img { width: 100%; height: 100%; object-fit: cover; }
.mini-card__title { font-size: 15.5px; font-weight: 700; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-card .meta { margin-top: 6px; }

/* ---------- Post card ---------- */
.grid { display: grid; gap: 28px 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
    position: relative; display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__title { font-size: 17.5px; font-weight: 800; line-height: 1.7; margin-top: 12px; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* full-card hit area */
.card__title a { transition: color .2s; }
.card:hover .card__title a { color: var(--accent); }
.card__excerpt {
    margin-top: 8px; font-size: 14.5px; color: var(--muted); line-height: 1.9;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card__excerpt * { all: unset; }
.card__foot { margin-top: auto; padding-top: 16px; }
.card .badge { position: relative; z-index: 2; }

.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta .sep { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }

.media-fallback {
    width: 100%; height: 100%; display: grid; place-items: center;
    background: var(--brand-grad); color: rgba(255, 255, 255, .85);
}
.media-fallback svg { width: 40%; max-width: 72px; height: auto; }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.widget__title { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.widget__title .i { color: var(--accent); }

.cat-list { list-style: none; }
.cat-list a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 10px; margin-inline: -10px; border-radius: 10px; font-size: 14.5px; color: var(--text-2);
    transition: background-color .2s, color .2s;
}
.cat-list a:hover { background: var(--surface-2); color: var(--text); }
.cat-list .count { font-size: 12px; color: var(--muted); min-width: 26px; text-align: center; background: var(--surface-2); border-radius: 999px; line-height: 22px; }

.cta-card {
    position: relative; overflow: hidden; border-radius: var(--radius); padding: 24px; color: #fff;
    background: var(--brand-grad);
}
.cta-card::after {
    content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
    inset-inline-start: -70px; bottom: -110px; background: rgba(255, 255, 255, .12);
}
.cta-card h3 { color: #fff; font-size: 18px; }
.cta-card p { margin-top: 8px; font-size: 14px; color: rgba(255, 255, 255, .85); }
.cta-card .btn { margin-top: 16px; background: #fff; color: #2b2d55; position: relative; z-index: 1; }
.cta-card .btn:hover { transform: translateY(-1px); }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 48px; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 14px; font-weight: 600; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
    transition: border-color .2s, background-color .2s, color .2s;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .is-current { background: var(--text); border-color: var(--text); color: var(--bg); }
.pager .is-disabled { opacity: .45; pointer-events: none; }
.pager .gap { border: 0; background: none; min-width: 20px; padding: 0; }

/* ---------- Empty state ---------- */
.empty {
    text-align: center; padding: 64px 24px; border: 1px dashed var(--border);
    border-radius: var(--radius-lg); background: var(--surface);
}
.empty__icon {
    width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px;
    display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.empty__icon .i { width: 28px; height: 28px; }
.empty h2 { font-size: 20px; }
.empty p { color: var(--muted); margin-top: 8px; }
.empty .btn { margin-top: 20px; }

/* ---------- Article ---------- */
.read-progress {
    position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 60;
    background: var(--brand-grad); transform-origin: right; transform: scaleX(0);
}

.article-head { position: relative; padding: 44px 0 28px; }
.article-head .page-head__title { display: block; line-height: 1.5; font-size: clamp(28px, 3.8vw, 44px); }
.article-head .meta { margin-top: 20px; font-size: 14px; }

.article-cover {
    margin-top: 8px; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 8;
    background: var(--surface-2); box-shadow: var(--shadow-lg);
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

.article-layout { display: grid; grid-template-columns: 1fr minmax(0, 760px) 1fr; gap: 32px; margin-top: 48px; }
.share-rail { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; justify-self: end; display: flex; flex-direction: column; gap: 10px; }
.share-btn {
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
    transition: color .2s, border-color .2s, transform .2s var(--ease);
}
.share-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.share-btn .i { width: 18px; height: 18px; }
.share-label { font-size: 11.5px; color: var(--muted); text-align: center; }

/* Long-form typography for content coming from the editor */
.prose { font-size: 17.5px; line-height: 2.1; color: var(--text-2); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.15em; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--text); scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h1, .prose h2 { font-size: 1.5em; margin-top: 1.9em; }
.prose h3 { font-size: 1.25em; margin-top: 1.6em; }
.prose h4 { font-size: 1.08em; margin-top: 1.4em; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.prose strong, .prose b { color: var(--text); font-weight: 800; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--brand-2); }
.prose img { border-radius: var(--radius); margin-inline: auto; height: auto !important; }
.prose figure { margin: 1.8em 0; }
.prose figcaption { text-align: center; font-size: .82em; color: var(--muted); margin-top: .7em; }
.prose blockquote {
    margin: 1.8em 0; padding: 18px 24px; border-inline-start: 4px solid var(--brand-2);
    background: var(--pink-soft); border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--text);
}
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; direction: ltr; unicode-bidi: embed; }
.prose pre { direction: ltr; text-align: left; background: #11121b; color: #e6e6f0; padding: 18px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .82em; line-height: 1.7; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { width: 100% !important; border-collapse: collapse; font-size: .9em; }
.prose .table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 12px; text-align: right; }
.prose th { background: var(--surface-2); color: var(--text); }
.prose iframe, .prose video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); }
.prose p:empty { display: none; }

.article-tags { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--border); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.article-tags__label { font-size: 14px; font-weight: 700; margin-inline-end: 4px; }

.share-inline { display: none; margin-top: 28px; gap: 10px; align-items: center; flex-wrap: wrap; }
.share-inline .share-label { margin-inline-end: 6px; font-size: 14px; font-weight: 700; color: var(--text); }

.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); z-index: 90;
    background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px;
    opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Comments ---------- */
.comments { margin-top: 64px; }
.comments__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.comments__count { font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; }

.comment-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.comment-form h3 { font-size: 18px; }
.comment-form > p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
.input {
    width: 100%; height: 48px; padding: 0 16px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--bg); outline: none;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
textarea.input { height: auto; min-height: 140px; padding: 14px 16px; resize: vertical; line-height: 1.9; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
.input::placeholder { color: var(--muted); opacity: .8; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; }

.alert { padding: 14px 18px; border-radius: 12px; font-size: 14.5px; margin-top: 18px; }
.alert ul { padding-inline-start: 18px; }
.alert--danger { background: var(--danger-soft); color: var(--danger); }
.alert--success { background: var(--success-soft); color: var(--success); }

.comment-list { list-style: none; margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.comment { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.avatar {
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
    font-weight: 800; font-size: 17px; color: #fff; background: var(--brand-grad);
}
.comment__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.comment__author { font-weight: 800; font-size: 15px; }
.comment__date { font-size: 12.5px; color: var(--muted); }
.comment__body { margin-top: 6px; font-size: 15px; color: var(--text-2); white-space: pre-line; }
.comment__replies { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.comment--reply { background: var(--surface-2); border-color: transparent; padding: 16px; }
.comment--reply .avatar { background: var(--text); color: var(--bg); width: 38px; height: 38px; font-size: 15px; }
.comment--reply { grid-template-columns: 38px minmax(0, 1fr); }
.author-badge { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* ---------- Static pages ---------- */
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.info-card {
    display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, transform .25s var(--ease);
}
a.info-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.info-card__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.info-card__icon .i { width: 22px; height: 22px; }
.info-card h3 { font-size: 15px; color: var(--muted); font-weight: 600; }
.info-card p, .info-card address { font-style: normal; font-size: 16.5px; font-weight: 700; margin-top: 4px; color: var(--text); }

.product-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 28px; }
.product-list li { list-style: none; padding: 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.product-list li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--brand-grad); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 56px 0 40px; }
.footer-about p { margin-top: 14px; color: var(--muted); font-size: 14.5px; max-width: 340px; }
.footer-col h4 { font-size: 14px; font-weight: 800; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 14.5px; color: var(--muted); transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.socials { display: flex; gap: 8px; margin-top: 18px; }
.socials a {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    border: 1px solid var(--border); color: var(--text-2); transition: color .2s, border-color .2s, background-color .2s;
}
.socials a:hover { color: #fff; background: var(--brand-grad); border-color: transparent; }
.socials .i { width: 18px; height: 18px; }
.trust { display: flex; gap: 10px; flex-wrap: wrap; }
.trust a { width: 84px; height: 84px; border-radius: 14px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; padding: 8px; }
.trust img { max-height: 100%; width: auto; }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.to-top {
    position: fixed; bottom: 24px; inset-inline-start: 24px; z-index: 40;
    width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); cursor: pointer;
    display: grid; place-items: center; opacity: 0; transform: translateY(10px); pointer-events: none;
    transition: opacity .25s, transform .25s var(--ease);
}
.to-top.is-show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sidebar .cta-card { grid-column: 1 / -1; }
    .article-layout { grid-template-columns: minmax(0, 760px); }
    .share-rail { display: none; }
    .share-inline { display: flex; }
    .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .nav, .header-actions .hide-md { display: none; }
    .menu-toggle { display: inline-flex; }
    .featured { grid-template-columns: minmax(0, 1fr); }
    .feature-card { min-height: 400px; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    :root { --gutter: 16px; --header-h: 62px; }
    body { font-size: 15.5px; }
    .hero { padding-top: 36px; }
    .grid, .grid--2, .sidebar, .info-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .feature-card { min-height: 360px; }
    .feature-card__body { padding: 22px; }
    .feature-card__excerpt { display: none; }
    .mini-card { grid-template-columns: 92px minmax(0, 1fr); }
    .prose { font-size: 16.5px; }
    .article-cover { aspect-ratio: 16 / 10; border-radius: var(--radius); }
    .comment-form { padding: 18px; }
    .comment { padding: 16px; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; }
    .avatar { width: 38px; height: 38px; font-size: 15px; }
    .footer-top { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .brand__text small { display: none; }
    .to-top { bottom: 16px; inset-inline-start: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .js .reveal { opacity: 1; transform: none; }
}

@media print {
    .site-header, .site-footer, .share-rail, .share-inline, .comments, .to-top, .read-progress, .search-overlay { display: none !important; }
    body { background: #fff; color: #000; }
}
