/* NW24 Modern Editorial Design System - Zero Bloat, 100 PageSpeed */
:root {
    --bg-page: #fbfbfa;
    --bg-card: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-heading: #111827;
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --accent: #0f766e;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.site-logo {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-heading);
    text-decoration: none !important;
}

.logo-mark {
    background: #111827;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 2px;
}

.logo-text {
    color: var(--primary);
}

.logo-badge {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 8px;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: var(--text-heading);
    font-size: 15px;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover {
    color: var(--primary);
    text-decoration: none;
    border-bottom-color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
}

.search-box input {
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    width: 220px;
    outline: none;
    transition: all 0.2s ease;
}

.search-box input:focus {
    width: 280px;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 340px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-dropdown a {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-heading);
    font-size: 14px;
}

.search-dropdown a:hover {
    background: #f8fafc;
    text-decoration: none;
}

/* Lang Switcher */
.lang-switcher {
    position: relative;
}

.lang-btn {
    background: var(--bg-page);
    border: 1px solid var(--border);
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    width: 180px;
    padding: 6px;
    z-index: 200;
}

.lang-dropdown.show {
    display: block;
}

.lang-dropdown a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-heading);
}

.lang-dropdown a:hover, .lang-dropdown a.active {
    background: #f1f5f9;
    text-decoration: none;
    font-weight: 600;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    padding: 48px 0 32px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.hero-tagline {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 12px;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-heading);
    width: 100%;
    margin-bottom: 16px;
}

.hero-desc {
    font-size: 19px;
    color: var(--text-muted);
    width: 100%;
    line-height: 1.5;
}

/* Tools Quick Grid */
.tools-strip {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 48px;
    box-shadow: var(--shadow-sm);
}

.tools-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.tool-card {
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all 0.2s ease;
    text-decoration: none !important;
    display: block;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tool-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Content Grid */
.section-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-heading);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
    margin-bottom: 60px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.badge-cat {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f1f5f9;
    color: #0369a1;
    border: 1px solid #e2e8f0;
    padding: 3px 9px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.15s ease;
}

a.badge-cat:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    text-decoration: none;
}

/* Category Filter Tabs / Buttons at Top of Article Lists */
.cat-filter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 28px;
}

.cat-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s ease;
}

.cat-filter-btn:hover {
    border-color: #0284c7;
    color: #0284c7;
    background: #f0f9ff;
    text-decoration: none;
}

.cat-filter-btn.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.meta-date {
    font-size: 12px;
    color: var(--text-muted);
}

.post-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 12px;
}

.post-card-title a {
    color: var(--text-heading);
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 20px;
    flex-grow: 1;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 14px;
    font-size: 13px;
}

.post-reading-time {
    color: var(--text-muted);
}

.read-btn {
    font-weight: 600;
    color: var(--primary);
}

/* Single Article & Tool Layout */
.single-article {
    width: 100%;
}

.article-header {
    width: 100%;
    margin: 36px 0 28px;
}

.article-title {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text-heading);
    margin: 16px 0;
}

.article-meta-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

/* AI Summary Box */
.ai-summary-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 36px;
    width: 100%;
}

.ai-summary-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #15803d;
    margin-bottom: 8px;
}

.ai-summary-text {
    font-size: 16px;
    line-height: 1.6;
    color: #166534;
    font-weight: 500;
}

/* Content Body */
.article-body {
    width: 100%;
    margin: 0;
    font-size: 17px;
    line-height: 1.75;
}

.article-body h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-heading);
    margin: 40px 0 16px;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
    margin: 32px 0 12px;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul, .article-body ol {
    margin: 0 0 24px 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    font-size: 15px;
}

.article-body th {
    background: #f8fafc;
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.article-body td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

/* FAQ Accordion Section */
.faq-section {
    width: 100%;
    margin: 48px 0 36px;
    border-top: 2px solid var(--border);
    padding-top: 36px;
}

.faq-section h2, .faq-accordion-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-heading);
}

.faq-accordion, .faq-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.faq-item {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item[open] {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.05);
}

.faq-item summary, .faq-question {
    padding: 16px 20px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-heading);
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    transition: background 0.15s ease;
}

.faq-item summary:hover, .faq-question:hover {
    background: #f8fafc;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after, .faq-question::after {
    content: '+';
    font-size: 20px;
    color: var(--text-muted);
}

.faq-item[open] summary::after, .faq-item[open] .faq-question::after {
    content: '−';
}

.faq-content, .faq-answer {
    padding: 20px 24px 22px;
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.7;
    border-top: 1px solid var(--border-light);
    background: #fafaf9;
}

.faq-content p, .faq-answer p {
    margin-bottom: 12px;
}

.faq-content p:last-child, .faq-answer p:last-child {
    margin-bottom: 0;
}

/* Author & Reviewer E-E-A-T Card */
.author-card {
    width: 100%;
    margin: 40px 0;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.author-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-heading);
}

.author-info p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Footer */
.site-footer {
    background: #111827;
    color: #e5e7eb;
    padding: 60px 0 30px;
    margin-top: 80px;
    border-top: 1px solid #1f2937;
}

.site-footer a {
    color: #9ca3af;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-desc {
    color: #9ca3af;
    font-size: 14px;
    line-height: 1.6;
    margin: 14px 0;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
    font-size: 14px;
}

.llm-badge {
    display: inline-block;
    background: #1f2937;
    border: 1px solid #374151;
    color: #cbd5e1 !important;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-family: monospace;
}

.footer-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lang-pill {
    background: #1f2937;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
}

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 900px) {
    .main-nav { display: none; }
    .mobile-toggle { display: block; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-title { font-size: 32px; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .header-inner { height: 60px; }
    .search-box input { width: 140px; }
    .search-box input:focus { width: 180px; }
    .hero-title { font-size: 26px; }
    .posts-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 12px; }
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-top: 16px;
}
.breadcrumbs a {
    color: var(--text-muted);
}
.breadcrumbs a:hover {
    color: var(--primary);
    text-decoration: none;
}
.breadcrumbs .sep {
    color: var(--border);
}
.breadcrumbs .current {
    color: var(--text-heading);
    font-weight: 500;
}

/* Category Hero & Description */
.category-hero {
    padding: 32px 0 28px;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--border);
}
.category-description {
    font-size: 17px;
    line-height: 1.65;
    color: #475569;
    width: 100%;
    margin-top: 14px;
}

/* Empty Category State */
.empty-cat-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}
.empty-cat-notice {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 36px;
}
.empty-cat-notice-icon {
    font-size: 24px;
    line-height: 1;
}
.empty-cat-notice-text h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 6px;
}
.empty-cat-notice-text p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.cat-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.cat-pill-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-heading);
    transition: all 0.2s ease;
}
.cat-pill-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f9ff;
    text-decoration: none;
    transform: translateY(-1px);
}

