:root {
    --ds-primary: #1b48ab;
    --ds-primary-light: #4e77d9;
    --ds-secondary: #ebd317;
    --ds-text: #0b1221;
    --ds-muted: #5a6072;
    --ds-bg: #f5f7fb;
    --ds-surface: rgba(255, 255, 255, 0.92);
    --ds-border: rgba(12, 31, 70, 0.08);
    --ds-shadow: 0 12px 45px rgba(7, 17, 45, 0.12);
    --ds-radius: 20px;
}

[data-theme="dark"] {
    --ds-bg: #0b1221;
    --ds-surface: rgba(14, 22, 40, 0.9);
    --ds-text: #f5f7fb;
    --ds-muted: #b7bfd6;
    --ds-border: rgba(255, 255, 255, 0.08);
    --ds-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

body.theme-blogelist {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    background: radial-gradient(circle at top, rgba(27, 72, 171, 0.08), transparent 55%),
                radial-gradient(circle at 20% 20%, rgba(235, 211, 23, 0.15), transparent 35%),
                var(--ds-bg);
    color: var(--ds-text);
    min-height: 100vh;
    padding: 2rem 1rem 3rem;
}

.blogelist-shell {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background: var(--ds-surface);
    border-radius: var(--ds-radius);
    border: 1px solid var(--ds-border);
    box-shadow: var(--ds-shadow);
}

.glassmorphism {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ds-header {
    display: grid;
    grid-template-columns: 1.2fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    align-items: center;
}

.ds-header .brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
}

.brand-logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    border: 1px solid var(--ds-border);
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-eyebrow {
    margin: 0;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ds-muted);
}

.ds-header h1 {
    margin: 0;
    font-size: 1.8rem;
}

.brand-tagline {
    margin: 0.3rem 0 0;
    color: var(--ds-muted);
}

.ds-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 600;
    color: var(--ds-muted);
    background: rgba(27, 72, 171, 0.08);
    transition: all 0.2s ease;
}

.nav-pill:hover,
.nav-pill.is-active {
    color: var(--ds-primary);
    border-color: rgba(27, 72, 171, 0.3);
    background: rgba(27, 72, 171, 0.15);
}

.ds-switchers {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.switcher {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.switcher-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ds-muted);
}

.chip-group {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.chip {
    border-radius: 999px;
    padding: 0.25rem 0.85rem;
    border: 1px solid var(--ds-border);
    text-decoration: none;
    font-size: 0.85rem;
    color: var(--ds-muted);
    transition: all 0.2s ease;
}

.chip:hover,
.chip.is-active {
    color: var(--ds-primary);
    border-color: rgba(27, 72, 171, 0.4);
    background: rgba(27, 72, 171, 0.08);
}

.ds-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.metric-label {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ds-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ds-hero h2 {
    margin: 0.35rem 0;
    font-size: 2.5rem;
}

.metric-hint {
    margin: 0.25rem 0 0.9rem;
    color: var(--ds-muted);
    font-size: 0.9rem;
}

.module-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.module-badge {
    padding: 0.35rem 0.8rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.04);
    font-size: 0.85rem;
}

.module-badge[data-active="true"] {
    background: rgba(235, 211, 23, 0.2);
    color: #7a5b00;
}

.ds-stack {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.module-chip {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(27, 72, 171, 0.12), rgba(235, 211, 23, 0.2));
    font-weight: 600;
    font-size: 0.85rem;
}

.quick-actions {
    display: flex;
    flex-direction: column;
}

.quick-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0.5rem 0 0.6rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 600;
    padding: 0.45rem 1.2rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(27, 72, 171, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--ds-primary), var(--ds-primary-light));
    color: #fff;
}

.btn-ghost {
    border-color: rgba(11, 18, 33, 0.2);
    color: var(--ds-text);
    background: transparent;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--ds-secondary), var(--ds-primary));
    color: #0b1221;
}

.ds-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.ds-main {
    min-width: 0;
}

.ds-breadcrumbs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--ds-muted);
}

.ds-breadcrumbs .crumb {
    color: var(--ds-primary);
    text-decoration: none;
}

.ds-module-surface {
    padding: 1.5rem;
}

.ds-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ds-design-system {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ds-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.ds-pillars article {
    padding: 1rem;
    border-radius: 16px;
    border: 1px dashed rgba(27, 72, 171, 0.25);
    background: rgba(27, 72, 171, 0.04);
}

.ds-pillars h4 {
    margin: 0 0 0.3rem;
}

.color-swatches {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.color-swatches .swatch {
    position: relative;
    padding: 0.4rem 0.8rem 0.4rem 1.8rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    font-weight: 600;
    color: var(--ds-text);
}

.color-swatches .swatch::before {
    content: '';
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 999px;
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: currentColor;
}

.color-swatches .swatch[data-label="primary"]::before {
    color: #1b48ab;
}

.color-swatches .swatch[data-label="secondary"]::before {
    color: #ebd317;
}

.color-swatches .swatch[data-label="dark"]::before {
    color: #121212;
}

.sidebar-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-card h3 {
    margin: 0;
    font-size: 1rem;
}

.sidebar-card p {
    margin: 0;
    color: var(--ds-muted);
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0.2rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-list--posts {
    gap: 0.6rem;
}

.sidebar-list a {
    text-decoration: none;
    color: var(--ds-primary);
    font-weight: 600;
}

.sidebar-post {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sidebar-post .post-meta {
    font-size: 0.75rem;
    color: var(--ds-muted);
}

.ds-footer {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-link {
    text-decoration: none;
    color: var(--ds-muted);
}

.footer-link:hover {
    color: var(--ds-primary);
}

@media (max-width: 1024px) {
    .ds-header {
        grid-template-columns: 1fr;
    }

    .ds-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body.theme-blogelist {
        padding: 1rem 0.75rem 2rem;
    }

    .blogelist-shell {
        gap: 1rem;
    }

    .ds-header {
        padding: 1.1rem;
    }

    .ds-hero {
        grid-template-columns: 1fr;
    }

    .ds-module-surface {
        padding: 1rem;
    }
}
