/* ============================================
   Wiki Rote Ndao — iOS Glass Design × Gold Luxury
   Premium UI • Apple-Inspired • Frosted Glass • Gold Dominant
   ============================================ */

:root {
    /* === Gold Palette — Warm & Luxurious === */
    --gold: #F5A623;
    --gold-dark: #D4890A;
    --gold-deep: #B8770A;
    --gold-light: #FFF1CC;
    --gold-pale: #FFF9E6;
    --gold-glow: rgba(245, 166, 35, 0.2);
    --gold-glow-strong: rgba(245, 166, 35, 0.35);
    --gold-gradient: linear-gradient(135deg, #F5A623 0%, #D4890A 50%, #F5C518 100%);
    --gold-gradient-soft: linear-gradient(135deg, #FFF1CC 0%, #FFE18F 50%, #F5C518 100%);
    --gold-gradient-glass: linear-gradient(135deg, rgba(245, 166, 35, 0.15), rgba(245, 197, 24, 0.08));
    --gold-border-subtle: rgba(245, 166, 35, 0.15);
    --gold-border: rgba(245, 166, 35, 0.3);

    /* === Background — Warm Cream Base === */
    --bg: #FAF8F5;
    --bg-warm: #F7F4EE;
    --bg-deep: #1a1a1e;
    
    /* === Glass System — iOS Frosted === */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-strong: rgba(255, 255, 255, 0.82);
    --glass-bg-card: rgba(255, 255, 255, 0.72);
    --glass-bg-warm: rgba(255, 248, 235, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-border-strong: rgba(255, 255, 255, 0.7);
    --glass-inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    --glass-blur: 24px;
    --glass-blur-strong: 32px;
    
    /* === Shadows — iOS Layered Depth === */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 60px rgba(0, 0, 0, 0.1);
    --shadow-gold: 0 4px 24px rgba(245, 166, 35, 0.15);
    --shadow-gold-strong: 0 8px 32px rgba(245, 166, 35, 0.25);
    --shadow-gold-inner: inset 0 1px 0 rgba(245, 166, 35, 0.1);
    
    /* === Radius — iOS Curves === */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-3xl: 36px;
    --radius-full: 9999px;
    
    /* === Typography — Apple SF Pro === */
    --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-serif: 'Georgia', 'Times New Roman', 'Palatino', serif;
    --font-mono: 'SF Mono', 'SFMono-Regular', 'Consolas', 'Liberation Mono', Menlo, monospace;
    
    /* === Sizing === */
    --max-width: 1200px;
    --max-width-narrow: 860px;
    --header-height: 64px;
    
    /* === Text === */
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #8e8e93;
    --text-on-gold: #1d1d1f;
    --text-link: #D4890A;
    
    /* === Misc === */
    --separator: rgba(60, 60, 67, 0.06);
    --separator-gold: rgba(245, 166, 35, 0.12);
}

/* ============ RESET ============ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============ BODY — Warm Foundation ============ */
body {
    font-family: var(--font-serif);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 16.5px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(245, 166, 35, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 40%, rgba(245, 197, 24, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(245, 166, 35, 0.02) 0%, transparent 50%);
    background-attachment: fixed;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}
a:hover { color: var(--gold-dark); }

/* ============ HEADER — iOS Glass Nav ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.8);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.8);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
    height: var(--header-height);
    transition: background 0.3s;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-border-subtle), transparent);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 16px;
}

/* === Logo === */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text) !important;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 22px;
    line-height: 1;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 4px var(--gold-glow));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.logo-sub {
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* === Search — iOS Style === */
.search-form {
    display: flex;
    gap: 0;
    flex: 0 1 340px;
}

.search-form input {
    flex: 1;
    padding: 9px 16px;
    border: 1.5px solid var(--separator);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 14px;
    font-family: var(--font-sans);
    background: rgba(245, 245, 247, 0.7);
    backdrop-filter: blur(8px);
    color: var(--text);
    outline: none;
    transition: all 0.3s;
}

.search-form input::placeholder {
    color: var(--text-tertiary);
    font-weight: 400;
}

.search-form input:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--gold);
    box-shadow: var(--shadow-gold-inner);
}

.search-form button {
    padding: 9px 18px;
    border: 1.5px solid var(--separator);
    border-left: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--gold-gradient);
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 2px 10px var(--gold-glow);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.search-form button:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 16px var(--gold-glow-strong);
}

/* === Mobile Toggle === */
.mobile-menu-toggle {
    display: none;
    font-size: 22px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(245, 245, 247, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--separator);
    transition: all 0.2s;
    line-height: 1;
    color: var(--text);
}

.mobile-menu-toggle:hover {
    background: rgba(245, 166, 35, 0.1);
    border-color: var(--gold-border-subtle);
}

.mobile-menu-toggle:active {
    transform: scale(0.9);
}

/* ============ LAYOUT — Main Content ============ */
.main-wrap {
    display: flex;
    gap: 28px;
    padding: 28px 20px 40px;
    min-height: calc(100vh - var(--header-height) - 200px);
}

/* ============ SIDEBAR — Glass Premium ============ */
.sidebar {
    flex: 0 0 220px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    align-self: flex-start;
}

.sidebar-section {
    background: var(--glass-bg-card);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    box-shadow: var(--shadow-md), var(--glass-inner-highlight);
    border: 1px solid var(--glass-border);
}

.sidebar-section h3 {
    font-family: var(--font-sans);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-tertiary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold-gradient);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li { margin: 0; }

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    margin-bottom: 1px;
}

.sidebar-menu a:hover {
    background: var(--gold-gradient-glass);
    color: var(--gold-dark);
    padding-left: 16px;
    transform: translateX(2px);
}

.sidebar-menu a:active {
    transform: scale(0.97);
}

.sidebar-menu a span { font-size: 15px; }

.sidebar-divider {
    height: 1px;
    background: var(--separator-gold);
    margin: 8px 0;
}

/* === Mobile Sidebar — iOS Bottom Sheet === */
.sidebar-header {
    display: none;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        max-height: 80vh;
        z-index: 200;
        padding: 0;
        transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
        transform: translateY(100%);
        background: transparent;
        border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
        overflow: hidden;
    }

    .sidebar.sidebar-open {
        transform: translateY(0);
    }

    .sidebar::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(4px);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s;
        pointer-events: none;
    }

    .sidebar.sidebar-open::before {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar .sidebar-section {
        border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
        height: auto;
        max-height: 80vh;
        overflow-y: auto;
        padding: 12px 20px 24px;
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
        border: none;
        border-top: 1px solid var(--glass-border-strong);
        background: var(--glass-bg-strong);
        backdrop-filter: blur(var(--glass-blur-strong)) saturate(1.8);
        -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(1.8);
    }

    /* iOS-style grab handle */
    .sidebar .sidebar-section::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: rgba(60, 60, 67, 0.15);
        border-radius: var(--radius-full);
        margin: 6px auto 12px;
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .sidebar-header h3 {
        margin: 0;
        padding: 0;
        border: none;
        font-size: 12px;
    }

    .sidebar-close {
        background: none;
        border: none;
        font-size: 18px;
        cursor: pointer;
        padding: 6px 12px;
        border-radius: var(--radius-full);
        color: var(--text-secondary);
        transition: all 0.2s;
    }

    .sidebar-close:hover {
        background: rgba(245, 166, 35, 0.1);
    }
}

/* ============ CONTENT AREA ============ */
.content-area {
    flex: 1;
    min-width: 0;
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    padding: 4px 0;
    letter-spacing: -0.1px;
}

.breadcrumb a { color: var(--text-tertiary); }
.breadcrumb a:hover { color: var(--gold-dark); }
.breadcrumb span { color: var(--text); font-weight: 500; }

/* ============ ARTICLE — Premium Glass Card ============ */
.entry {
    background: var(--glass-bg-card);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-md), var(--glass-inner-highlight);
    border: 1px solid var(--glass-border-strong);
    transition: box-shadow 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.entry-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gold-gradient);
}

.entry-header h1 {
    font-family: var(--font-sans);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 10px;
}

.category-badge {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 4px 14px;
    background: var(--gold-gradient);
    color: #fff;
    border-radius: var(--radius-full);
    font-weight: 700;
    box-shadow: 0 2px 10px var(--gold-glow);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* === Source & Update Info === */
.source-info, .updated-info {
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--text-secondary);
    padding: 10px 16px;
    background: var(--gold-gradient-glass);
    border: 1px solid var(--gold-border-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    backdrop-filter: blur(4px);
}

.source-badge { display: inline-block; margin-right: 4px; vertical-align: middle; }

/* === Article Layout === */
.entry-layout {
    display: flex;
    gap: 32px;
}

/* === TOC — Glass Sidebar === */
.toc {
    flex: 0 0 200px;
    background: rgba(250, 248, 245, 0.5);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 16px;
    font-size: 13.5px;
    align-self: flex-start;
    position: sticky;
    top: calc(var(--header-height) + 90px);
    box-shadow: var(--shadow-xs), var(--glass-inner-highlight);
    max-height: calc(100vh - var(--header-height) - 120px);
    overflow-y: auto;
}

.toc h3 {
    font-family: var(--font-sans);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold-gradient);
}

.toc ul { list-style: none; }
.toc li { margin: 2px 0; }

.toc a {
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--text-secondary);
    display: block;
    padding: 4px 0;
    padding-left: 10px;
    border-left: 2px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
    line-height: 1.4;
}

.toc a:hover {
    color: var(--text);
    border-left-color: var(--gold);
    padding-left: 14px;
}

.entry-content {
    flex: 1;
    min-width: 0;
}

/* ============ ENTRY CONTENT STYLING ============ */
.entry-content h2 {
    font-family: var(--font-sans);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text);
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--separator-gold);
}

.entry-content h3 {
    font-family: var(--font-sans);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: var(--text);
    margin: 26px 0 12px;
}

.entry-content h4 {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 20px 0 10px;
}

.entry-content p {
    margin-bottom: 16px;
    text-align: justify;
}

.entry-content ul, .entry-content ol {
    margin: 12px 0 16px 24px;
}

.entry-content li {
    margin-bottom: 6px;
    line-height: 1.6;
}

/* === Tables — Premium === */
.entry-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    font-family: var(--font-sans);
    font-size: 13px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.entry-content thead th,
.entry-content th {
    background: linear-gradient(135deg, #2d2d2f 0%, #1d1d1f 100%);
    color: #fff;
    padding: 11px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.entry-content td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--separator);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
}

.entry-content tr:last-child td {
    border-bottom: none;
}

.entry-content tr:nth-child(even) td {
    background: rgba(245, 166, 35, 0.03);
}

.entry-content tr:hover td {
    background: rgba(245, 166, 35, 0.07);
}

/* === Blockquote === */
.entry-content blockquote {
    border-left: 4px solid var(--gold);
    padding: 12px 20px;
    margin: 16px 0;
    background: var(--gold-pale);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* === Code === */
.entry-content code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--gold-light);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--gold-dark);
}

.entry-content pre {
    background: #1d1d1f;
    color: #f5f5f7;
    padding: 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.6;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.entry-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

/* === Images === */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 20px 0;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s;
}

.entry-content img:hover {
    box-shadow: var(--shadow-lg);
}

/* ============ HOMEPAGE — Hero Premium ============ */
.hero {
    text-align: center;
    padding: 40px 20px 28px;
    background: linear-gradient(135deg, 
        rgba(245, 166, 35, 0.04) 0%, 
        rgba(245, 197, 24, 0.06) 40%,
        rgba(255, 248, 235, 0.4) 70%,
        rgba(245, 166, 35, 0.02) 100%
    );
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.06), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 197, 24, 0.04), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero h1 {
    font-family: var(--font-sans);
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.8px;
    background: linear-gradient(135deg, #1d1d1f 30%, var(--gold-dark) 70%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 660px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.hero-source {
    font-family: var(--font-sans);
    font-size: 12px !important;
    color: var(--text-tertiary) !important;
    margin-top: 12px !important;
    opacity: 0.7;
}

.hero-infographic {
    margin: 28px auto;
    max-width: 780px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.06));
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

/* === Stats Row === */
.stats-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin: 32px 0;
}

.stat-card {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    text-align: center;
    flex: 1;
    max-width: 190px;
    box-shadow: var(--shadow-md), var(--glass-inner-highlight);
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--gold-border-subtle);
    border-color: rgba(245, 166, 35, 0.2);
    background: rgba(255, 255, 255, 0.88);
}

.stat-icon { 
    font-size: 24px; 
    display: block; 
    margin-bottom: 6px; 
}

.stat-number {
    font-family: var(--font-sans);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1.1;
}

.stat-label {
    font-family: var(--font-sans);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* === About Grid === */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.about-card {
    background: var(--glass-bg-card);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: var(--shadow-sm), var(--glass-inner-highlight);
}

.about-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--glass-inner-highlight);
    border-color: var(--gold-border-subtle);
    background: rgba(255, 255, 255, 0.82);
}

.about-card h3 {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.about-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* === Category Grid === */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.cat-card {
    background: var(--glass-bg-card);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px 14px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    box-shadow: var(--shadow-xs), var(--glass-inner-highlight);
}

.cat-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-gold), 0 0 0 1px var(--gold-glow-strong);
    transform: translateY(-4px) scale(1.03);
    background: rgba(255, 255, 255, 0.85);
}

.cat-icon { font-size: 28px; }

.cat-name {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.cat-count {
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--text-tertiary);
}

/* === Entry List === */
.entry-list {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.entry-card {
    display: block;
    background: var(--glass-bg-card);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    color: var(--text) !important;
    box-shadow: var(--shadow-xs), var(--glass-inner-highlight);
}

.entry-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-gold), var(--glass-inner-highlight);
    transform: translateX(4px) translateY(-1px);
    background: rgba(255, 255, 255, 0.85);
}

.entry-card h3, .entry-card h4 {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.entry-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.cat-tag {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 2px 10px;
    background: var(--gold-gradient);
    color: #fff;
    border-radius: var(--radius-full);
    font-weight: 700;
    margin-bottom: 5px;
    box-shadow: 0 1px 4px var(--gold-glow);
}

.cat-heading {
    font-family: var(--font-sans);
    font-size: 17px;
    color: var(--text);
    margin: 24px 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--gold-gradient);
    font-weight: 700;
}

.result-count {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

/* === Sections === */
.section {
    margin: 40px 0;
}

.section h2 {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold-gradient);
}

/* === CTA Section === */
.cta-section {
    text-align: center;
    padding: 28px;
    background: var(--gold-gradient-glass);
    border: 1px solid var(--gold-border-subtle);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.cta-section p {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.cta-section a {
    color: var(--gold-dark) !important;
    font-weight: 600;
}

.cta-section a:hover {
    color: var(--text) !important;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    font-size: 17px;
    color: var(--text-tertiary);
    background: var(--glass-bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
}

/* ============ TAGS ============ */
.entry-tags {
    font-family: var(--font-sans);
    font-size: 12px;
    padding: 6px 10px;
    margin-bottom: 6px;
}

.tag-link {
    display: inline-block;
    padding: 2px 12px;
    margin: 2px 2px;
    background: var(--gold-gradient-glass);
    color: var(--gold-dark) !important;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    border: 1px solid var(--gold-border-subtle);
}

.tag-link:hover {
    background: var(--gold-gradient);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--gold-glow);
}

/* ============ ENTRY FOOTER ATTRIBUTION ============ */
.entry-footer-attribution {
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: var(--text-secondary);
    padding: 14px 18px;
    margin-top: 24px;
    background: var(--gold-gradient-glass);
    border: 1px solid var(--gold-border-subtle);
    border-radius: var(--radius);
    line-height: 1.6;
    backdrop-filter: blur(4px);
}

.entry-footer-attribution a {
    color: var(--gold-dark) !important;
    font-weight: 500;
}

.entry-footer-attribution a:hover {
    color: var(--text) !important;
    text-decoration: underline;
}

/* ============ FOOTER DISCLAIMER ============ */
.footer-disclaimer {
    font-size: 11px !important;
    opacity: 0.4 !important;
    margin-top: 4px !important;
    max-width: 680px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ============ DISCLAIMER PAGE ============ */
.disclaimer-page {
    max-width: 780px;
    margin: 0 auto;
}

.disclaimer-page h2 {
    font-family: var(--font-sans);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold-gradient);
}

.disclaimer-section {
    background: var(--glass-bg-card);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-xs), var(--glass-inner-highlight);
    transition: all 0.3s;
}

.disclaimer-section:hover {
    box-shadow: var(--shadow-md), var(--glass-inner-highlight);
    border-color: var(--gold-border-subtle);
}

.disclaimer-section h3 {
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.disclaimer-section p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.disclaimer-section p:last-child { margin-bottom: 0; }

.disclaimer-section ul {
    margin: 8px 0 12px 22px;
    font-size: 14px;
    color: var(--text-secondary);
}

.disclaimer-section li { margin-bottom: 4px; line-height: 1.6; }

.disclaimer-section a {
    color: var(--gold-dark) !important;
    font-weight: 500;
}

.disclaimer-section a:hover { text-decoration: underline; }

/* ============ SHARE BUTTONS ============ */
.share-buttons {
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    margin-top: 24px;
    border-top: 1px solid var(--separator-gold);
    font-size: 13px;
    color: var(--text-tertiary);
    flex-wrap: wrap;
}

.share-buttons a {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--gold-gradient-glass);
    border: 1px solid var(--gold-border-subtle);
    color: var(--text) !important;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.share-buttons a:hover {
    background: var(--gold-gradient);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 12px var(--gold-glow);
}

/* ============ RELATED ENTRIES ============ */
.related-entries {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-top: 24px;
    box-shadow: var(--shadow-md), var(--glass-inner-highlight);
}

.related-entries h3 {
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold-gradient);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.related-card {
    display: block;
    padding: 14px 16px;
    background: var(--gold-gradient-glass);
    border: 1px solid var(--gold-border-subtle);
    border-radius: var(--radius);
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.related-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
    background: rgba(245, 166, 35, 0.08);
}

.related-card strong {
    display: block;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text);
    margin-bottom: 3px;
}

.related-cat {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
}

/* ============ FOOTER — iOS Glass ============ */
.site-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.8);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.8);
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 32px 0 24px;
    margin-top: 40px;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-border-subtle), transparent);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-inner p {
    font-size: 13px;
    line-height: 1.5;
}

.footer-inner strong {
    font-family: var(--font-sans);
    color: var(--text);
}

.footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--gold-dark);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--gold-gradient-glass);
    border: 1px solid var(--gold-border-subtle);
    transition: all 0.2s;
}

.footer-links a:hover {
    background: var(--gold-gradient);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--gold-glow);
}

.footer-copy {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--separator-gold);
    text-align: center;
}

.footer-copy p {
    font-size: 11px;
    opacity: 0.45;
}

/* ============ PAGINATION ============ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 24px 0 8px;
    font-family: var(--font-sans);
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
    box-shadow: var(--shadow-xs), var(--glass-inner-highlight);
}

.pagination a:hover {
    background: var(--gold-gradient);
    color: #fff !important;
    border-color: var(--gold);
    box-shadow: 0 2px 8px var(--gold-glow);
    transform: translateY(-1px);
}

.pagination .current {
    background: var(--gold-gradient);
    color: #fff;
    border-color: var(--gold);
    box-shadow: 0 2px 8px var(--gold-glow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
}

/* ============ PRINT ============ */
@media print {
    .site-header, .sidebar, .site-footer, .share-buttons,
    .related-entries, .breadcrumb, .toc, .search-form { display: none !important; }
    .main-wrap { display: block; padding: 0; }
    .content-area { max-width: 100%; }
    .entry { box-shadow: none; border: none; padding: 20px 0; background: none; }
    .entry-content { font-size: 12pt; line-height: 1.6; }
    .entry-content table { font-size: 10pt; }
    .entry-content a { color: #000 !important; text-decoration: underline; }
    body { background: #fff; }
    .hero { background: none; border: none; }
    @page { margin: 2cm; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .entry-layout { flex-direction: column; }
    .toc { flex: none; position: static; width: 100%; max-height: none; }
    .sidebar { flex: 0 0 200px; }
    .entry { padding: 32px; }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .mobile-menu-toggle { display: block; }
    
    .main-wrap { padding: 16px 12px 32px; }
    .entry { padding: 20px; border-radius: var(--radius-lg); }
    .entry-header h1 { font-size: 24px; }
    .hero h1 { font-size: 26px; }
    .hero { padding: 28px 12px 20px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stats-row { flex-wrap: wrap; gap: 10px; }
    .stat-card { max-width: none; flex: 0 0 calc(50% - 5px); padding: 16px; }
    .stat-number { font-size: 26px; }
    
    .header-inner { height: var(--header-height); gap: 10px; }
    .search-form { flex: 1 1 100%; display: none; }
    .search-form.search-active { display: flex; }
    .logo-sub { display: none; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
    
    .about-grid { grid-template-columns: 1fr; }
    .entry-content table { font-size: 12px; }
    .entry-content th,
    .entry-content td { padding: 6px 8px; }
}

@media (max-width: 480px) {
    .category-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .cat-card { padding: 14px 10px; }
    .cat-icon { font-size: 22px; }
    .entry { padding: 16px; }
    .hero h1 { font-size: 22px; }
    .stat-card { padding: 14px; }
    .stat-number { font-size: 22px; }
}

/* ============ FLOATING BACK TO TOP ============ */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text);
    box-shadow: var(--shadow-md), var(--glass-inner-highlight);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg), var(--glass-inner-highlight);
    border-color: var(--gold);
    background: var(--gold-gradient);
    color: #fff;
}

.back-to-top:active {
    transform: scale(0.9);
}
