:root {
    --bg: #fdfdfc;
    --surface: #ffffff;
    --surface-strong: #f4f5f8;
    --surface-soft: #fafaf9;
    --surface-warm: #fffbeb;
    --elevated: #ffffff;
    --ink: #0f172a;
    --body: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --brand: #4f46e5;
    --brand-dark: #3730a3;
    --accent: #e11d48;
    --coral: #ea580c;
    --danger: #ef4444;
    --danger-soft: #fef2f2;
    --shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.02);
    --shadow-soft: 0 4px 20px -8px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.01);
    --shadow-hover: 0 20px 40px -12px rgba(79, 70, 229, 0.15), 0 1px 5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --page-max: 1200px;
    --reading-max: 720px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
    --bg: #090d16;
    --surface: #121826;
    --surface-strong: #1e293b;
    --surface-soft: #0d121f;
    --surface-warm: #2c2015;
    --elevated: #161e2e;
    --ink: #f8fafc;
    --body: #cbd5e1;
    --muted: #64748b;
    --line: #1e293b;
    --line-strong: #334155;
    --brand: #6366f1;
    --brand-dark: #4f46e5;
    --accent: #fb7185;
    --danger: #fca5a5;
    --danger-soft: #451a1a;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.36);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.24);
    --shadow-hover: 0 20px 48px rgba(99, 102, 241, 0.25);
}

[data-theme="light"] {
    --bg: #fdfdfc;
    --surface: #ffffff;
    --surface-strong: #f4f5f8;
    --surface-soft: #fafaf9;
    --surface-warm: #fffbeb;
    --elevated: #ffffff;
    --ink: #0f172a;
    --body: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --danger: #ef4444;
    --danger-soft: #fef2f2;
    --shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.02);
    --shadow-soft: 0 4px 20px -8px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.01);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6,
.brand,
.main-nav,
.button-link,
button,
.trending-number,
.card-category,
.eyebrow,
.next-mini span {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.01em;
}

h2[id],
h3[id] {
    scroll-margin-top: 100px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--body);
    line-height: 1.8;
    transition: background 0.35s ease, color 0.35s ease;
}

.site-main {
    min-height: 56vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
.button-link {
    border: 0;
    border-radius: var(--radius);
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

button:hover,
.button-link:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.button-link.muted {
    background: var(--surface-strong);
    color: var(--ink);
    box-shadow: none;
}

.button-link.muted:hover {
    background: var(--line-strong);
    color: var(--ink);
    box-shadow: none;
}

.danger-button {
    background: var(--danger-soft) !important;
    color: var(--danger) !important;
    border-color: color-mix(in srgb, var(--danger) 20%, var(--line)) !important;
    box-shadow: none;
}

.danger-button:hover {
    background: var(--danger) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
}

/* ── Announcement Bar ── */
.announcement-bar {
    background: color-mix(in srgb, var(--brand) 6%, var(--bg));
    border-bottom: 1px solid var(--line);
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 8px 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 38px;
    z-index: 40;
}

.announcement-bar-content {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
}

.announcement-bar a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.announcement-bar a:hover {
    color: var(--accent);
}

.marquee-text {
    display: inline-block;
    animation: marquee 25s linear infinite;
    padding-left: 50vw;
}

@keyframes marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* RTL marquee animation */
[dir="rtl"] .marquee-text {
    animation: marquee-rtl 25s linear infinite;
    padding-right: 50vw;
    padding-left: 0;
}

@keyframes marquee-rtl {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(100%, 0, 0);
    }
}

/* ── Header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 76px;
    padding: 10px clamp(18px, 5vw, 56px);
    background: color-mix(in srgb, var(--surface) 80%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 210px;
    order: 1;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.18);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand:hover .brand-logo {
    transform: scale(1.06);
}

.brand strong {
    font-weight: 800;
    font-size: 1.28rem;
    line-height: 1.2;
    color: var(--ink);
}

.brand small {
    color: var(--muted);
    line-height: 1.35;
    max-width: 290px;
    font-size: 0.74rem;
    font-weight: 500;
    margin-top: 2px;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    order: 3;
}

.theme-toggle {
    background: var(--surface-soft);
    color: var(--ink);
    min-height: 38px;
    gap: 8px;
    padding: 0 14px;
    font-size: 0.86rem;
    font-weight: 600;
    border-radius: 99px;
    border: 1px solid var(--line);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--surface-strong);
    border-color: var(--line-strong);
    box-shadow: none;
    transform: translateY(-1px);
}

.theme-toggle-icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    position: relative;
}

.theme-toggle-icons svg {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.theme-toggle-icons .icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle-icons .icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.theme-toggle.is-dark .theme-toggle-icons .icon-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.theme-toggle.is-dark .theme-toggle-icons .icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Hamburger */
.hamburger {
    display: none;
    background: transparent;
    color: var(--ink);
    min-height: 40px;
    width: 44px;
    padding: 0;
    border-radius: 50%;
}

.hamburger:hover {
    background: var(--surface-strong);
    transform: none;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s, opacity 0.2s;
}

.hamburger-icon {
    position: relative;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.hamburger-icon::before {
    transform: translateY(-6px);
}

.hamburger-icon::after {
    transform: translateY(6px);
}

.hamburger.is-open .hamburger-icon {
    background: transparent;
}

.hamburger.is-open .hamburger-icon::before {
    transform: rotate(45deg);
}

.hamburger.is-open .hamburger-icon::after {
    transform: rotate(-45deg);
}

.main-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    margin-left: auto;
    order: 2;
}

.main-nav a {
    border-radius: 99px;
    color: var(--muted);
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--surface-strong);
    color: var(--ink);
}

.main-nav .pill-link:hover {
    border-color: var(--brand);
    background: var(--surface-soft);
}

/* ── Dropdown Menu ── */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: transparent;
    color: var(--muted);
    border: 0;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border-radius: 99px;
    transition: all 0.2s ease;
}

.dropdown-toggle:hover,
.dropdown-toggle[aria-expanded="true"] {
    background: var(--surface-strong);
    color: var(--ink);
}

.dropdown-arrow {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.8;
}

.dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    margin-top: 8px;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 6px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown:hover .dropdown-menu,
.dropdown-toggle[aria-expanded="true"] + .dropdown-menu,
.dropdown-menu:focus-within {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    border-radius: 8px;
    color: var(--muted) !important;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 0.88rem;
    text-align: start;
    display: block;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: transparent !important;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: var(--surface-strong) !important;
    color: var(--brand) !important;
}

[dir="rtl"] .dropdown-menu {
    left: auto;
    right: 0;
}

/* ── Hero ── */
.hero-band {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: none;
    margin: 0;
    overflow: hidden;
    padding: clamp(48px, 8vw, 96px) clamp(18px, 5vw, 56px);
    background: radial-gradient(circle at 10% 20%, color-mix(in srgb, var(--brand) 6%, transparent) 0%, transparent 45%),
                radial-gradient(circle at 90% 80%, color-mix(in srgb, var(--accent) 5%, transparent) 0%, transparent 45%),
                var(--surface-soft);
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    color: var(--brand);
    font-weight: 800;
    margin: 0 0 12px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

h1, h2, h3, p {
    margin-top: 0;
}

.results-summary {
    color: var(--muted);
    margin: 14px 0 0;
    font-size: 0.95rem;
}

/* ── Hero Layout ── */
.hero-layout {
    display: grid;
    grid-template-columns: 1.62fr 1fr;
    gap: clamp(28px, 5vw, 48px);
    max-width: var(--page-max);
    width: 100%;
    margin: 0 auto;
}

/* ── Featured Card ── */
.featured-card {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s, border-color 0.3s;
    text-decoration: none;
    color: inherit;
}

.featured-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
    box-shadow: var(--shadow-hover);
}

.featured-card-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 8;
    background: var(--surface-soft);
}

.featured-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover .featured-card-image-wrap img {
    transform: scale(1.03);
}

.featured-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: clamp(20px, 4vw, 32px);
}

.featured-card .article-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 0.82rem;
    color: var(--muted);
}

.featured-card .card-category {
    color: var(--brand);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.featured-card h2 {
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    line-height: 1.3;
    margin: 0;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.featured-card:hover h2 {
    color: var(--brand);
}

.featured-card p {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--brand);
    margin-top: 6px;
    transition: gap 0.2s;
}

.featured-card:hover .featured-card-cta {
    gap: 12px;
}

.cta-arrow {
    flex-shrink: 0;
    transition: transform 0.2s;
}

[dir="rtl"] .cta-arrow {
    transform: scaleX(-1);
}

.featured-card span,
.article-card span {
    color: var(--brand);
    font-size: 0.92rem;
    font-weight: 800;
}

.featured-card p,
.article-card p,
.page-head p {
    color: var(--muted);
}

/* ── Sections ── */
.section-wrap {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 64px clamp(18px, 5vw, 56px);
}

.section-band {
    background: color-mix(in srgb, var(--surface-soft) 50%, transparent);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    max-width: none;
    margin: 0;
}

.section-band > * {
    max-width: var(--page-max);
    margin-right: auto;
    margin-left: auto;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 36px;
}

.section-heading h1,
.section-heading h2 {
    margin-bottom: 0;
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    color: var(--ink);
    font-weight: 800;
}

.section-heading > a {
    color: var(--brand);
    font-weight: 800;
    font-size: 0.92rem;
    border-bottom: 2px solid color-mix(in srgb, var(--brand) 25%, transparent);
    transition: all 0.2s;
}

.section-heading > a:hover {
    color: var(--brand-dark);
    border-bottom-color: var(--brand-dark);
}

/* ── Trending Sidebar ── */
.trending-sidebar {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: clamp(24px, 4vw, 36px);
    box-shadow: var(--shadow-soft);
}

.trending-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
}

.trending-icon {
    color: var(--accent);
}

.trending-header h3 {
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink);
    margin: 0;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.trending-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    transition: transform 0.2s ease;
}

.trending-item:hover {
    transform: translateX(4px);
}

[dir="rtl"] .trending-item:hover {
    transform: translateX(-4px);
}

.trending-number {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.65;
    transition: opacity 0.2s ease;
}

.trending-item:hover .trending-number {
    opacity: 1;
}

.trending-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.trending-category {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trending-content h4 {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ink);
    margin: 0;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-item:hover h4 {
    color: var(--brand);
}

.trending-meta {
    font-size: 0.78rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 980px) {
    .hero-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Category Grid ── */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    justify-content: center;
}

.category-tile {
    position: relative;
    display: block;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-soft);
}

.category-tile::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 20px;
    bottom: 20px;
    width: 4px;
    border-radius: 99px;
    background: linear-gradient(180deg, var(--brand), var(--accent));
}

.category-tile:hover {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.category-tile strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
}

.category-tile span {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
    margin-top: 8px;
    font-weight: 500;
}

/* ── Article Grid ── */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s, border-color 0.3s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}

.article-card a {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.article-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    background: var(--surface-soft);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-card:hover img {
    transform: scale(1.02);
}

.article-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    flex-grow: 1;
}

.article-card-body > span {
    display: none;
}

.meta-chips,
.article-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    direction: ltr;
    padding: 0;
}

.article-card .meta-chips span,
.meta-chips span,
.article-card-meta span,
.article-card-meta time {
    display: inline-flex;
    align-items: center;
    width: auto;
    border-radius: 99px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.2;
    font-weight: 600;
}

.article-card-meta .card-category,
.meta-chips span {
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    color: var(--brand);
    border: 1px solid color-mix(in srgb, var(--brand) 12%, var(--line));
    padding: 4px 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-card h2,
.article-card h3 {
    line-height: 1.35;
    margin: 2px 0 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card:hover h3,
.article-card:hover h2 {
    color: var(--brand);
}

.article-card p {
    margin-bottom: 0;
    margin-top: 4px;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Page Head ── */
.page-head {
    padding: 64px clamp(18px, 5vw, 56px) 44px;
    background: radial-gradient(circle at 10% 20%, color-mix(in srgb, var(--brand) 5%, transparent) 0%, transparent 45%),
                var(--surface-soft);
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.page-head h1 {
    font-size: clamp(2rem, 4.5vw, 2.75rem);
    line-height: 1.15;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.page-head p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
}

.page-head > * {
    max-width: var(--page-max);
    margin-right: auto;
    margin-left: auto;
}

/* ── Two Column ── */
.two-column {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
    gap: 40px;
}

.side-panel {
    position: sticky;
    top: 96px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.side-panel h2 {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink);
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}

.side-panel a,
.side-panel p {
    display: block;
    margin: 8px 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
    font-weight: 500;
    transition: all 0.2s ease;
}

.side-panel a.active,
.side-panel a:hover {
    color: var(--brand);
    font-weight: 700;
    transform: translateX(2px);
}

[dir="rtl"] .side-panel a.active,
[dir="rtl"] .side-panel a:hover {
    transform: translateX(-2px);
}

/* ── Flash / Empty ── */
.empty-state,
.flash {
    max-width: 760px;
    margin: 24px auto;
    border-radius: var(--radius);
    padding: 20px 24px;
    background: var(--surface-warm);
    border: 1px solid color-mix(in srgb, var(--coral) 20%, var(--line));
    color: var(--coral);
}

.empty-state::before {
    content: "";
    display: block;
    width: 32px;
    height: 4px;
    border-radius: 99px;
    background: var(--coral);
    margin-bottom: 12px;
}

.flash.success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.flash.error {
    background: #fef2f2;
    border-color: #fecdd3;
    color: #b91c1c;
}

.rich-empty {
    margin: 0 0 24px;
    max-width: none;
}

.rich-empty h2 {
    margin-bottom: 6px;
    font-size: 1.25rem;
    color: var(--ink);
    font-weight: 700;
}

.rich-empty p {
    color: var(--muted);
    margin-bottom: 16px;
}

.mini-link-list {
    display: grid;
    gap: 10px;
}

.mini-link-list a {
    color: var(--brand);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mini-link-list a:hover {
    color: var(--brand-dark);
}

.table-empty {
    margin: 0;
    max-width: none;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    gap: 8px;
    margin-top: 36px;
    justify-content: center;
}

.pagination a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.pagination a:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-1px);
}

.pagination a.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* ── Article Page ── */
.article-shell {
    padding-bottom: 48px;
}

.article-hero {
    padding: 64px clamp(18px, 5vw, 56px) 48px;
    background: radial-gradient(circle at 10% 20%, color-mix(in srgb, var(--brand) 5%, transparent) 0%, transparent 45%),
                var(--surface-soft);
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.article-hero > * {
    max-width: var(--reading-max);
    margin-right: auto;
    margin-left: auto;
}

.article-hero .breadcrumb,
.article-hero .eyebrow,
.article-hero .article-meta {
    justify-content: center;
}

.article-hero h1 {
    font-size: clamp(2.25rem, 5.5vw, 3.25rem);
    line-height: 1.15;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.article-hero p {
    color: var(--muted);
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    line-height: 1.55;
    margin-bottom: 24px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 20px;
    font-size: 0.84rem;
    font-weight: 600;
    align-items: center;
}

.breadcrumb a {
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--brand);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    align-items: center;
}

.admin-edit-article {
    margin-top: 24px;
}

.article-meta span,
.article-meta time,
.status {
    border-radius: 99px;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface-soft));
    color: var(--brand);
    border: 1px solid color-mix(in srgb, var(--brand) 10%, var(--line));
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 700;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-link,
.tag-list a,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

[dir="ltr"] .tag-link::before,
[dir="ltr"] .tag-list a::before {
    content: "#";
    margin-right: 4px;
    opacity: 0.5;
    font-weight: 400;
}

[dir="rtl"] .tag-link::before,
[dir="rtl"] .tag-list a::before {
    content: "#";
    margin-left: 4px;
    opacity: 0.5;
    font-weight: 400;
}

.tag-link:hover,
.tag-list a:hover {
    background: color-mix(in srgb, var(--brand) 8%, var(--surface-soft)) !important;
    color: var(--brand) !important;
    border-color: color-mix(in srgb, var(--brand) 30%, var(--line)) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 12%, transparent);
}

.article-cover {
    width: min(calc(100% - clamp(36px, 10vw, 112px)), var(--page-max));
    aspect-ratio: 21 / 9;
    max-height: 480px;
    margin: 40px auto 32px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
}

.article-layout {
    display: block;
    max-width: var(--reading-max);
    margin: 0 auto;
    padding: 24px 20px 48px;
}

.article-content-wrapper {
    width: 100%;
}

.article-content {
    font-size: clamp(1.05rem, 0.4vw + 0.95rem, 1.15rem);
    background: transparent;
    color: var(--body);
}

.article-content h2,
.article-content h3 {
    margin-top: 48px;
    margin-bottom: 16px;
    line-height: 1.3;
    color: var(--ink);
    font-weight: 800;
}

.article-content h2 {
    font-size: clamp(1.5rem, 2.5vw, 2.1rem);
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}

.article-content h3 {
    font-size: clamp(1.25rem, 1.8vw, 1.6rem);
}

.article-content p,
.article-content li {
    color: var(--body);
    line-height: 1.85;
}

.article-content p {
    margin-bottom: 1.5em;
}

.article-content ul,
.article-content ol {
    padding-left: 24px;
    margin: 0 0 1.5em;
}

.article-content li {
    margin-bottom: 0.5em;
}

.article-content a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: color-mix(in srgb, var(--brand) 30%, transparent);
    font-weight: 600;
    transition: all 0.2s ease;
}

.article-content a:hover {
    color: var(--brand-dark);
    text-decoration-color: var(--brand-dark);
}

.article-content code {
    background: var(--surface-strong);
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 0.88em;
    font-family: monospace;
    color: var(--accent);
    border: 1px solid var(--line);
}

.article-content pre {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    padding: 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 28px 0;
}

.article-content pre code {
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 0.9rem;
    color: var(--ink);
}

.article-content blockquote {
    border-left: 4px solid var(--brand);
    margin: 36px 0;
    padding: 20px 28px;
    background: var(--surface-soft);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--ink);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.7;
}

[dir="rtl"] .article-content ul,
[dir="rtl"] .article-content ol {
    padding-left: 0;
    padding-right: 24px;
}

[dir="rtl"] .article-content blockquote {
    border-left: none;
    border-right: 4px solid var(--brand);
    border-radius: var(--radius) 0 0 var(--radius);
}

/* ── Table of Contents ── */
.toc {
    display: none;
}

.article-details {
    display: none;
}

.article-footer-tags {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.article-footer-tags .tag-list {
    margin-top: 0;
}

/* ── Share Buttons ── */
.article-faq {
    max-width: var(--reading-max);
    margin: 48px auto 0;
    padding: 0 20px;
}

.article-faq h2 {
    margin-bottom: 20px;
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    color: var(--ink);
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-list details {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 16px 20px;
    box-shadow: var(--shadow-soft);
}

.faq-list summary {
    cursor: pointer;
    color: var(--ink);
    font-weight: 700;
    font-size: 1.05rem;
}

.faq-list p {
    margin: 12px 0 0;
    color: var(--body);
    line-height: 1.7;
}

.article-share {
    max-width: var(--reading-max);
    margin: 48px auto;
    padding: 32px 20px;
    text-align: center;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.article-share strong {
    display: block;
    margin-bottom: 18px;
    font-size: 1.05rem;
    color: var(--ink);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 99px;
    font-size: 0.88rem;
    font-weight: 600;
    min-height: 38px;
    transition: all 0.2s ease;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
}

.share-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    background: var(--surface-soft);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-soft);
}

.share-btn:hover .share-icon {
    transform: scale(1.1);
}

.share-twitter:hover { border-color: #1da1f2; color: #1da1f2; background: rgba(29, 161, 242, 0.05); }
.share-linkedin:hover { border-color: #0077b5; color: #0077b5; background: rgba(0, 119, 181, 0.05); }
.share-facebook:hover { border-color: #1877f2; color: #1877f2; background: rgba(24, 119, 242, 0.05); }
.share-whatsapp:hover { border-color: #25d366; color: #25d366; background: rgba(37, 211, 102, 0.05); }

/* Comments and reactions */
.article-reactions,
.article-comments {
    max-width: var(--reading-max);
    margin: 48px auto;
    padding: 0 20px;
}

.article-reactions {
    text-align: center;
}

.article-reactions h2,
.article-comments h2 {
    margin-bottom: 20px;
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    color: var(--ink);
}

.reaction-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.reaction-button {
    gap: 8px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-soft);
    font-weight: 600;
    transition: all 0.2s ease;
}

.reaction-button:hover,
.reaction-button.is-active {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    color: var(--brand);
    box-shadow: none;
    transform: translateY(-1px);
}

.reaction-button:disabled {
    opacity: 0.72;
    cursor: wait;
}

.reaction-emoji {
    font-size: 1.25rem;
    line-height: 1;
}

.reaction-button strong {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    min-height: 26px;
    border-radius: 50%;
    background: var(--surface-strong);
    color: var(--ink);
    font-size: 0.76rem;
    font-weight: 700;
}

.reaction-status,
.comment-status {
    display: block;
    min-height: 1.3em;
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 700;
}

.reaction-status {
    margin-top: 14px;
}

.article-comments-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.article-comments-head h2 {
    margin-bottom: 0;
}

.article-comments-head > span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.comment-list {
    display: grid;
    gap: 16px;
}

.comment-card,
.comment-form {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.comment-card {
    padding: 20px;
}

.comment-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.comment-card header strong {
    color: var(--ink);
    font-weight: 700;
}

.comment-card time {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.comment-card p {
    color: var(--body);
    margin-bottom: 0;
    font-size: 0.96rem;
    line-height: 1.6;
}

.comment-form {
    margin-top: 28px;
    padding: 24px;
}

.comment-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.comment-form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.spam-trap {
    position: absolute !important;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    margin: -1px !important;
    max-width: 1px !important;
    min-height: 1px !important;
    min-width: 1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    white-space: nowrap;
    border: 0 !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0;
    pointer-events: none;
}

/* ── Newsletter ── */
.article-newsletter,
.footer-newsletter {
    text-align: center;
}

.article-newsletter {
    max-width: var(--reading-max);
    margin: 48px auto;
    padding: 40px 32px;
    background: var(--surface-soft);
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.article-newsletter h2 {
    margin-bottom: 8px;
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    color: var(--ink);
}

.article-newsletter p {
    color: var(--muted);
    margin-bottom: 24px;
    font-size: 1rem;
}

.newsletter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 460px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 46px;
    padding: 0 16px;
    background: var(--surface);
    color: var(--ink);
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.newsletter-form input:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}

/* ── Search Box (used on articles/404 pages) ── */
.search-box {
    display: flex;
    gap: 10px;
    align-items: stretch;
    max-width: 620px;
    margin-top: 24px;
}

.search-box input {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 48px;
    padding: 0 18px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease;
}

.search-box input:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}

.search-box.compact {
    max-width: 520px;
}

.newsletter-form input::placeholder,
.search-box input::placeholder {
    color: var(--muted);
    opacity: 0.8;
}

.newsletter-form button {
    white-space: nowrap;
}

.newsletter-status {
    flex: 0 0 100%;
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 700;
    min-height: 1.2em;
    text-align: center;
}

.privacy-note {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 8px;
}

/* ── 404 Page ── */
.error-page {
    min-height: 50vh;
    display: grid;
    place-items: center;
    padding: 60px 20px;
    text-align: center;
}

.error-content {
    max-width: 560px;
}

.error-code {
    display: block;
    font-size: clamp(5rem, 12vw, 10rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 10px;
}

.error-content h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.error-content p {
    color: var(--muted);
    margin-bottom: 24px;
}

.error-content .search-box {
    margin: 0 auto 18px;
}

/* ── Back to Top ── */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 1.3rem;
    display: grid;
    place-items: center;
    z-index: 30;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
    padding: 0;
    min-height: auto;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--brand-dark);
    transform: translateY(-2px);
}

/* ── Auth ── */
.auth-shell {
    min-height: 70vh;
    display: grid;
    place-items: center;
    padding: 34px 18px;
}

.auth-card {
    width: min(100%, 470px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 28px;
}

.form-stack {
    display: grid;
    gap: 15px;
}

.form-stack label {
    display: grid;
    gap: 6px;
    color: var(--ink);
    font-weight: 700;
}

.form-stack input,
.form-stack textarea,
.form-stack select,
.ai-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 44px;
    padding: 9px 12px;
    background: var(--surface);
    color: var(--ink);
}

.form-stack textarea {
    resize: vertical;
}

.field-meter,
.field-help,
.draft-status {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.field-meter.is-over {
    color: var(--coral);
}

.draft-status {
    min-height: 1.2em;
    margin: 0;
}

.image-preview {
    display: none;
    gap: 8px;
}

.image-preview.has-image {
    display: grid;
}

.image-preview span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.image-preview img {
    width: 100%;
    max-height: 170px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    object-fit: cover;
}

.media-picker {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-strong);
    padding: 12px;
}

.media-picker strong {
    font-size: 0.88rem;
}

.media-picker > div {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.media-picker button {
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
    aspect-ratio: 1;
}

.media-picker img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.seo-audit {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-strong);
    padding: 12px;
}

.seo-audit-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.seo-audit-head span {
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 8px;
    font-size: 0.78rem;
    font-weight: 900;
}

.seo-audit-head span.is-good {
    background: #dcfce7;
    color: #166534;
}

.seo-audit ul {
    display: grid;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.seo-audit li {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.seo-audit li::before {
    content: "!";
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    border-radius: 50%;
    background: #fee2e2;
    color: #991b1b;
    font-size: 0.72rem;
    font-weight: 900;
}

.seo-audit li.pass::before {
    content: "+";
    background: #dcfce7;
    color: #166534;
}

.internal-link-tool {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-strong);
    padding: 14px;
}

.internal-link-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.internal-link-head h2 {
    margin: 0;
    font-size: 1rem;
}

.internal-link-head button,
.internal-link-item button {
    min-height: 34px;
    padding: 5px 10px;
}

.internal-link-list {
    display: grid;
    gap: 10px;
}

.internal-link-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 10px;
}

.internal-link-item strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.internal-link-item span {
    grid-column: 1;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.internal-link-item div {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ── Admin ── */
.admin-shell {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    gap: 24px;
    padding: 30px clamp(18px, 5vw, 72px);
    align-items: start;
}

.admin-menu {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--surface);
}

.admin-menu strong {
    margin-bottom: 8px;
}

.admin-menu a,
.admin-menu button {
    justify-content: flex-start;
    width: 100%;
    background: transparent;
    color: var(--muted);
    min-height: 40px;
    padding: 8px 10px;
}

.admin-menu a.active,
.admin-menu a:hover,
.admin-menu button:hover {
    background: var(--surface-strong);
    color: var(--ink);
}

.admin-content {
    min-width: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.stats-grid div,
.admin-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--elevated);
    padding: 18px;
    box-shadow: 0 1px 0 rgba(24, 32, 31, 0.03);
}

.admin-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(150px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}

.admin-filters label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.admin-filters input,
.admin-filters select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 42px;
    padding: 8px 10px;
    background: var(--surface);
    color: var(--ink);
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.helper-text {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    margin: 10px 0 0;
}

.upload-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.upload-form label {
    display: grid;
    gap: 6px;
    color: var(--ink);
    font-weight: 800;
}

.upload-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 44px;
    padding: 9px 12px;
    background: var(--surface);
    color: var(--ink);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.media-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.media-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-bottom: 1px solid var(--line);
}

.media-card-body {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.media-card-body strong {
    overflow-wrap: anywhere;
    font-size: 0.88rem;
}

.media-card-body span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.media-actions button,
.media-actions a {
    min-height: 34px;
    padding: 5px 10px;
}

.taxonomy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.taxonomy-list {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.taxonomy-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(220px, 1fr) auto auto;
    gap: 10px;
    align-items: end;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.taxonomy-row.tags-row {
    grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto auto;
}

.taxonomy-row label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.taxonomy-row input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 40px;
    padding: 8px 10px;
    background: var(--surface);
    color: var(--ink);
}

.count-pill {
    align-self: center;
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--muted);
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 900;
    white-space: nowrap;
}

.taxonomy-delete {
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.analytics-panel {
    display: grid;
    gap: 12px;
}

.metric-list,
.upcoming-list {
    display: grid;
    gap: 10px;
}

.metric-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 12px;
}

.metric-row span,
.metric-row em {
    position: relative;
    z-index: 1;
}

.metric-row strong,
.upcoming-list strong {
    display: block;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.metric-row small,
.upcoming-list span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.metric-row em {
    color: var(--brand);
    font-style: normal;
    font-weight: 900;
}

.metric-row i {
    position: absolute;
    inset: auto 0 0 0;
    width: var(--metric-width);
    height: 4px;
    background: var(--brand);
}

.mini-chart {
    display: grid;
    grid-template-columns: repeat(14, minmax(24px, 1fr));
    gap: 8px;
    align-items: end;
    min-height: 190px;
}

.mini-chart div {
    display: grid;
    gap: 8px;
    align-items: end;
    min-width: 0;
    height: 170px;
}

.mini-chart span {
    display: block;
    height: var(--bar-height);
    min-height: 6px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, var(--brand), var(--accent));
}

.mini-chart small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
    transform: rotate(-45deg);
}

.upcoming-list a {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 12px;
}

.subscriber-search-field {
    grid-column: span 3;
}

.admin-results-summary {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 12px;
}

.stats-grid span {
    display: block;
    color: var(--brand);
    font-size: 2rem;
    font-weight: 900;
}

.table-wrap {
    overflow-x: auto;
}

.comments-table {
    min-width: 920px;
}

.comment-cell {
    max-width: 360px;
    color: var(--body);
    overflow-wrap: anywhere;
}

.comment-search-field {
    grid-column: span 2;
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0;
}

th, td {
    border-bottom: 1px solid var(--line);
    text-align: left;
    padding: 12px 10px;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 0.9rem;
    background: var(--surface-strong);
    font-weight: 900;
}

tbody tr {
    transition: background 0.16s;
}

tbody tr:hover {
    background: color-mix(in srgb, var(--surface-strong) 55%, transparent);
}

.status.published {
    background: #dcfce7;
    color: #166534;
}

.status.draft {
    background: #fff7ed;
    color: #9a3412;
}

.status.scheduled {
    background: #dbeafe;
    color: #1d4ed8;
}

.status.pending {
    background: #fff7ed;
    color: #9a3412;
}

.status.approved {
    background: #dcfce7;
    color: #166534;
}

[data-theme="dark"] .status.published {
    background: #163822;
    color: #bbf7d0;
}

[data-theme="dark"] .status.draft {
    background: #3b2a16;
    color: #fed7aa;
}

[data-theme="dark"] .status.scheduled {
    background: #172554;
    color: #bfdbfe;
}

[data-theme="dark"] .status.pending {
    background: #3b2a16;
    color: #fed7aa;
}

[data-theme="dark"] .status.approved {
    background: #163822;
    color: #bbf7d0;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.actions a,
.actions button {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    min-height: 34px;
    padding: 5px 10px;
    border-radius: var(--radius);
}

.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}

.editor-preview-panel {
    grid-column: 1 / -1;
}

.compact-heading {
    margin-bottom: 12px;
}

.editor-preview {
    max-width: 820px;
    color: var(--ink);
}

.editor-preview h1 {
    font-size: clamp(1.6rem, 3vw, 2.7rem);
    line-height: 1.2;
    margin-bottom: 12px;
}

.editor-preview h2,
.editor-preview h3 {
    margin-top: 24px;
    line-height: 1.35;
}

.editor-preview p,
.editor-preview li,
.preview-placeholder,
.preview-excerpt {
    color: var(--muted);
}

.editor-preview ul {
    padding-left: 22px;
}

.checkbox-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px !important;
}

.checkbox-row input {
    width: 18px;
    min-height: 18px;
}

.ai-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 480px);
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.ai-panel p {
    color: var(--muted);
    margin: 0;
}

.ai-form {
    display: flex;
    gap: 8px;
}

.ai-result {
    grid-column: 1 / -1;
    color: var(--muted);
}

.checklist {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: var(--surface-strong);
    color: var(--muted);
}

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: var(--surface-soft);
    margin-top: 64px;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(240px, 1.3fr) minmax(140px, 0.7fr) minmax(140px, 0.7fr) minmax(280px, 1.3fr);
    gap: 40px;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 64px clamp(18px, 5vw, 56px) 48px;
}

.footer-brand strong {
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 800;
}

.footer-brand p {
    max-width: 360px;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--muted);
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav strong {
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.footer-nav a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--brand);
}

.footer-newsletter {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    text-align: start;
}

.footer-newsletter strong {
    color: var(--ink);
    display: block;
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.footer-newsletter p {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.footer-bottom {
    padding: 24px clamp(18px, 5vw, 56px);
    border-top: 1px solid var(--line);
    font-size: 0.84rem;
    text-align: center;
    color: var(--muted);
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Responsive ── */
@media (max-width: 980px) {
    .site-header {
        flex-wrap: wrap;
        min-height: 70px;
    }

    .header-actions {
        margin-left: auto;
        order: 2;
    }

    .hamburger {
        display: grid;
        place-items: center;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding-top: 12px;
        border-top: 1px solid var(--line);
        margin-left: 0;
        order: 3;
    }

    .main-nav.open {
        display: flex;
    }

    .dropdown {
        display: block;
    }

    .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 11px 12px;
        border-radius: var(--radius);
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 0 12px 8px;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
        display: flex;
    }

    .main-nav a {
        padding: 11px 12px;
        border-radius: var(--radius);
    }

    .site-footer .footer-main {
        grid-template-columns: 1fr 1fr;
    }

    .hero-band,
    .two-column,
    .admin-shell,
    .editor-grid,
    .ai-panel {
        grid-template-columns: 1fr;
    }

    .hero-band {
        max-width: none;
        min-height: auto;
        background-position: center;
    }



    .article-grid,
    .archive-grid,
    .stats-grid,
    .settings-grid,
    .taxonomy-grid,
    .analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-grid .category-tile {
        flex: 0 1 calc(50% - 16px);
    }

    .side-panel,
    .admin-menu {
        position: static;
    }



    .admin-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .taxonomy-row,
    .taxonomy-row.tags-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .subscriber-search-field,
    .filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .brand {
        min-width: 0;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand small {
        display: none;
    }

    .theme-toggle-text {
        display: none;
    }

    .theme-toggle {
        width: 42px;
        padding: 0;
    }

    .hero-band,
    .section-wrap,
    .page-head,
    .article-hero,
    .admin-shell {
        padding-right: 16px;
        padding-left: 16px;
    }

    .article-hero h1 {
        font-size: clamp(1.85rem, 8vw, 2.2rem);
    }

    .article-hero p {
        font-size: 1rem;
    }

    .search-box,
    .ai-form,
    .section-heading,
    .newsletter-form {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box button,
    .newsletter-form button {
        width: 100%;
    }



    .article-grid,
    .archive-grid,
    .stats-grid,
    .settings-grid,
    .admin-filters,
    .taxonomy-grid,
    .analytics-grid,
    .comment-form-grid,
    .taxonomy-row,
    .taxonomy-row.tags-row,
    .upload-form {
        grid-template-columns: 1fr;
    }

    .category-grid .category-tile {
        flex: 0 1 100%;
    }
    .internal-link-item {
        grid-template-columns: 1fr;
    }

    .internal-link-item span,
    .internal-link-item div {
        grid-column: 1;
        grid-row: auto;
    }

    .mini-chart {
        overflow-x: auto;
        grid-template-columns: repeat(14, minmax(34px, 1fr));
    }

    .filter-panel {
        position: sticky;
        top: 70px;
        z-index: 12;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 10px;
    }

    .filter-panel h2 {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .filter-panel a {
        flex: 0 0 auto;
        margin: 0;
        border-radius: 999px;
        background: var(--surface-strong);
        padding: 8px 12px;
        white-space: nowrap;
    }

    .featured-card {
        min-height: 0;
    }

    .article-cover {
        width: calc(100% - 32px);
        aspect-ratio: 16 / 10;
        margin-top: 18px;
    }

    .toc,
    .article-details {
        display: none;
    }

    .article-content {
        font-size: 1rem;
    }

    .article-share,
    .article-newsletter {
        margin-right: 16px;
        margin-left: 16px;
    }

    .article-comments,
    .article-reactions {
        margin-right: 16px;
        margin-left: 16px;
        padding-right: 0;
        padding-left: 0;
    }

    .site-footer .footer-main {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    button:hover,
    .button-link:hover,
    .featured-card:hover,
    .article-card:hover,
    .category-tile:hover,
    .share-btn:hover,
    .back-to-top:hover {
        transform: none;
    }
}

/* ── RTL Style Adjustments ── */
[dir="rtl"] {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
}

[dir="rtl"] body {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
}

[dir="rtl"] h1, 
[dir="rtl"] h2, 
[dir="rtl"] h3, 
[dir="rtl"] h4, 
[dir="rtl"] h5, 
[dir="rtl"] h6,
[dir="rtl"] .brand,
[dir="rtl"] .main-nav,
[dir="rtl"] .button-link,
[dir="rtl"] button,
[dir="rtl"] .trending-number,
[dir="rtl"] .card-category,
[dir="rtl"] .eyebrow,
[dir="rtl"] .next-mini span {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    letter-spacing: normal;
}

[dir="rtl"] .main-nav {
    margin-right: auto;
    margin-left: 0;
}

[dir="rtl"] th,
[dir="rtl"] td {
    text-align: right;
}



[dir="rtl"] .back-to-top {
    right: auto;
    left: 28px;
}

/* ── Custom FAQ Details styling ── */
.faq-list details {
    transition: background 0.3s, border-color 0.3s;
}
.faq-list details[open] {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 3%, var(--surface));
}
.faq-list summary {
    position: relative;
    padding-right: 30px;
    list-style: none;
}
.faq-list summary::-webkit-details-marker {
    display: none;
}
.faq-list summary::after {
    content: '';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-right: 2.5px solid var(--muted);
    border-bottom: 2.5px solid var(--muted);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.3s;
}
[dir="rtl"] .faq-list summary {
    padding-right: 0;
    padding-left: 30px;
}
[dir="rtl"] .faq-list summary::after {
    right: auto;
    left: 5px;
}
.faq-list details[open] summary::after {
    transform: translateY(-30%) rotate(-135deg);
}

/* ── Admin Newsletter Form ── */
.campaign-card {
    margin-top: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 24px;
}
.campaign-card h2 {
    margin-top: 0;
    margin-bottom: 18px;
}
.campaign-card form {
    display: grid;
    gap: 16px;
}

/* ── Category Rows Showcase ── */
.categories-showcase {
    display: flex;
    flex-direction: column;
    gap: 48px;
    border-top: 1px solid var(--line);
    margin-top: 56px;
    padding-top: 56px !important;
}

.category-row-block {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.category-row-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    white-space: nowrap;
    color: var(--ink);
}

.category-row-header h3 a {
    transition: color 0.2s ease;
}

.category-row-header h3 a:hover {
    color: var(--brand);
}

.category-row-line {
    flex-grow: 1;
    height: 1px;
    background: var(--line);
}

.category-view-all {
    color: var(--brand);
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.category-view-all:hover {
    color: var(--brand-dark);
}

.category-scroll-wrapper {
    position: relative;
    margin: 0 -20px;
    padding: 0 20px;
    overflow: hidden;
}

.category-scroll-container {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.category-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.category-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.category-scroll-container::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 99px;
}

.category-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

.category-scroll-container .scroll-article-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

/* RTL styles adjustments */
[dir="rtl"] .category-row-header h3 {
    order: 1;
}
[dir="rtl"] .category-row-line {
    order: 2;
}
[dir="rtl"] .category-view-all {
    order: 3;
}

/* ── Rich Text Editor Images & Tables ── */
.article-body-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 2.5rem auto;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}
.article-body-image:hover {
    transform: scale(1.01);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 2.5rem 0;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox by default */
    -ms-overflow-style: none;  /* IE/Edge */
}

/* Hide scrollbar for Chrome/Safari/Opera by default */
.table-responsive::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}
.table-responsive::-webkit-scrollbar-track {
    background: transparent;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 99px;
}

/* Show scrollbar thumb on hover */
.table-responsive:hover::-webkit-scrollbar-thumb {
    background: var(--line-strong);
}
.table-responsive:hover {
    scrollbar-width: thin; /* Show thin scrollbar on Firefox hover */
}

/* Style both public tables and editor tables for seamless WYSIWYG experience */
.article-table,
.ql-editor table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: left;
    color: var(--body);
}

[dir="rtl"] .article-table,
[dir="rtl"] .ql-editor table {
    text-align: right;
}

.article-table th,
.ql-editor table th {
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 16px 20px;
    border-bottom: 2px solid var(--line-strong);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.article-table td,
.ql-editor table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    transition: background-color 0.2s ease;
}

/* Rounded corners for table-responsive container */
.article-table tr:first-child th:first-child,
.ql-editor table tr:first-child th:first-child {
    border-top-left-radius: 16px;
}
.article-table tr:first-child th:last-child,
.ql-editor table tr:first-child th:last-child {
    border-top-right-radius: 16px;
}
.article-table tr:last-child td:first-child,
.ql-editor table tr:last-child td:first-child {
    border-bottom-left-radius: 16px;
}
.article-table tr:last-child td:last-child,
.ql-editor table tr:last-child td:last-child {
    border-bottom-right-radius: 16px;
}

[dir="rtl"] .article-table tr:first-child th:first-child,
[dir="rtl"] .ql-editor table tr:first-child th:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 16px;
}
[dir="rtl"] .article-table tr:first-child th:last-child,
[dir="rtl"] .ql-editor table tr:first-child th:last-child {
    border-top-right-radius: 0;
    border-top-left-radius: 16px;
}

.article-table tr:last-child td,
.ql-editor table tr:last-child td {
    border-bottom: none;
}

/* Hover highlights for rows */
.article-table tr:hover td,
.ql-editor table tr:hover td {
    background-color: color-mix(in srgb, var(--brand) 4%, var(--surface-soft));
    color: var(--ink);
}

/* Alternate row shading */
.article-table tr:nth-child(even) td,
.ql-editor table tr:nth-child(even) td {
    background-color: color-mix(in srgb, var(--surface-soft) 30%, transparent);
}
