@font-face {
    font-family: 'Organetto-BoldCnd';
    src: url('./fonts/Organetto-BoldCnd.woff2') format('woff2'),
         url('./fonts/Organetto-BoldCnd.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
/* inter-regular - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/inter-v20-latin-regular.woff2') format('woff2');
}
/* inter-italic - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: italic;
  font-weight: 400;
  src: url('./fonts/inter-v20-latin-italic.woff2') format('woff2');
}
/* inter-500 - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  src: url('./fonts/inter-v20-latin-500.woff2') format('woff2');
}
/* inter-500italic - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: italic;
  font-weight: 500;
  src: url('./fonts/inter-v20-latin-500italic.woff2') format('woff2');
}
/* inter-600 - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  src: url('./fonts/inter-v20-latin-600.woff2') format('woff2');
}
/* inter-700 - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  src: url('./fonts/inter-v20-latin-700.woff2') format('woff2');
}

:root {
    /* Colors */
    --primary: #5856d6;
    --primary-light: #8b89fd;
    --text-main: #080820;
    --text-secondary: #b2b2b2;
    --bg-body: #ffffff;
    --bg-card-main: #f3f4f6; /* The missing gray background */
    --bg-cell-white: #ffffff;
    
    --gradient-start: #64d9ff;
    --gradient-end: #caff0a;

    /* Spacing */
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    
    /* Sizing */
    --container-width: 1440px; 
    --sidebar-width: 300px;
    
    /* Fonts */
    --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-title: 'Organetto-BoldCnd', 'Inter', system-ui, -apple-system, sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

a { text-decoration: none; color: inherit; cursor: pointer; }
img { max-width: 100%; width: auto; height:auto; display: block; }

/* Basic text elements */
p { 
    font-size: 16px; 
    line-height: 1.5;
}

/* Links in article text */
article p a,
article li a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

article p a:hover,
article li a:hover {
    color: var(--primary-light);
}

figure {
    margin-bottom: 16px;
}

/* Utils */
.text-purple { color: var(--primary-light); }
.text-secondary { color: var(--text-secondary); }
.text-main { color: var(--text-main); }
.font-bold { font-weight: 700; }
.italic { font-style: italic; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Spacing utilities */
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.section-spacing { margin-top: 40px; margin-bottom: 40px; }

/* Author & Meta */
.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}
.author-name {
    font-size: 14px;
    text-align: center;
    line-height: 1.2;
}
.meta-divider {
    width: 2px;
    height: 16px;
    background-color: var(--text-secondary);
    opacity: 0.5;
}

/* Citation */
.citation-source {
    text-align: right;
    margin-top: 4px;
}

/* Store buttons */
.store-buttons {
    display: flex;
    gap: 13px;
    margin-top: 21px;
}
.store-buttons-sm {
    display: flex;
    gap: 9px;
    margin-top: auto;
}
.store-buttons a {
    display: inline-flex;
}
.store-btn-lg {
    height: 42px;
    width: auto;
    transition: opacity 0.2s;
}
.store-btn-lg:hover {
    opacity: 0.8;
}

/* Sidebar links */
.sidebar-links {
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-link-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.sidebar-dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

/* Section heading in article */
.section-heading {
    font-size: 20px;
    margin-bottom: 20px;
    text-transform: none;
}

/* Subsection headings */
h3 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

h4 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

/* Checklist (универсальный) */
.checklist {
    list-style: none;
    margin: 20px 0;
    padding-left: 0;
}

.checklist li {
    padding-left: 28px;
    margin-bottom: 12px;
    position: relative;
    line-height: 1.5;
}

.checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
}

/* Section description paragraph */
.section-desc {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* Layout */
.site-header {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 40px 60px;
    display: flex;
    justify-content: space-between; /* Logo Left, Buttons Right */
    align-items: center;
}

.onbalance-logo {
    width: auto;
    height: 33px;
}

.header-actions {
    display: flex;
    gap: 9px;
    align-items: center;
}

.header-actions a, .store-buttons-sm a {
    display: inline-flex;
}
.store-btn {
    height: 36px;
    width: auto;
    transition: opacity 0.2s;
}
.store-btn:hover {
    opacity: 0.8;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 60px 0;
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 60px; /* Reduced from 100px */
    align-items: start;
}

@media (max-width: 1200px) {
    .container {
        gap: 40px;
        padding: 0 40px 0px;
    }
    .site-header { padding: 40px; }
}

@media (max-width: 900px) {
    .container { grid-template-columns: 1fr; }
    .sidebar { display: none; /* Or stack */ }
}

/* Main Content Card Wrapper & Style */
.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    margin-top: 100px;
}

.main-card {
    background-color: var(--bg-card-main);
    border-radius: 24px;
    padding: 30px 40px; /* Reduced padding */
    width: 100%;
    /* Ensure content inside doesn't overflow improperly */
    overflow: hidden; 
}

@media (max-width: 768px) {
    .main-card { padding: 16px; } 
}

/* Typography */
h1.article-title {
    font-size: 50px;
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    font-family: var(--font-title);
    font-style: normal;
}

h2 {
    font-size: 36px;
    font-weight: normal;
    line-height: 1.3;
    margin-top: 30px;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-family: var(--font-title);
    font-style: normal;
}

.intro-text {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 40px;
    font-weight: 400;
}

/* Meta & Breadcrumbs */
.breadcrumbs {
    display: flex;
    gap: 16px;
    margin-bottom: 0px; /* Reset, since gap is on wrapper */
    padding: 0 40px; /* Align with main-card text */
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    align-items: center;
}

.breadcrumb-divider {
    width: 2px;
    height: 18px;
    background-color: var(--text-secondary);
    opacity: 0.8;
}

@media (max-width: 768px) {
    .breadcrumbs { padding: 0 16px; }
}

.article-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 40px;
    font-size: 14px;
    font-weight: 500;
}

.author-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-name a:hover {
    color: var(--primary);
}

/* Quote */
.quote-card {
    background-color: white;
    border-radius: 16px;
    padding: 30px 40px;
    margin-bottom: 30px;
}
.quote-text {
    font-size: 18px;
    font-style: italic;
    font-weight: 500;
    margin-bottom: 15px;
    line-height: 1.5;
}
.quote-author {
    text-align: right;
    font-weight: 600;
}

/* Table of contents */
.toc {
    background-color: white;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 30px;
}

.toc-title {
    font-family: var(--font-title);
    font-size: 18px;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    margin-bottom: 12px;
}

.toc-list {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toc-list a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
}

.toc-list a:hover {
    color: var(--primary);
}

.toc-bullet {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .toc {
        padding: 20px;
    }
}

/* Steps */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 40px;
}
.step-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.step-head {
    display: flex;
    gap: 16px;
    align-items: center;
}
.step-num {
    font-size: 36px;
    font-weight: normal;
    color: var(--primary-light);
    line-height: 1;
    font-family: var(--font-title);
    font-style: normal;
    flex-shrink: 0;
}
.step-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}
.step-content {
    font-size: 16px;
    line-height: 1.5;
}

/* Promo Banner - Fixed */
.promo-banner {
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    border-radius: 24px; /* Increased radius */
    padding: 50px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    /* Ensure image stays inside or looks deliberate */
    overflow: hidden; 
    margin-top: 60px;
    min-height: 380px;
}

.promo-img {
    position: absolute;
    right: 104px;
    bottom: 0px; 
    width: 256px;
    z-index: 1;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15));
}

.promo-text h3 {
    z-index: 2;
    width: 55%;
    position: relative;
    font-size: 26px;
    font-weight: normal;
    text-transform: uppercase;
    font-family: var(--font-title);
    font-style: normal;
    line-height: 1.2;
}

@media (max-width: 1330px) {
    .promo-banner {
        flex-direction: column;
        padding: 40px 30px 0; /* No bottom padding so image sits on edge */
        text-align: center;
        height: auto;
    }
    .promo-text { 
        width: 100%; 
        margin-bottom: 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .promo-text h3 {
        width: 100%; 
        text-align: center;
    }
    .store-buttons {
        justify-content: center;
    }
    .promo-img {
        position: relative;
        right: auto;
        bottom: -10px;
        width: 240px;
        margin: 0 auto;
    }
}

/* TABLE STYLING - Semantic Tables */
.table-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
    padding-bottom: 16px; /* Space for scrollbar */
    margin-bottom: 16px;
}

.article-meta-group {
    display: flex;
    align-items: center;
    gap: 10px;
}


.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 8px;
}

/* Force scroll on smaller screens */
@media (max-width: 1024px) {
    .data-table {
        min-width: 900px;
    }
}

.data-table th {
    background-color: var(--primary-light);
    color: white;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.2;
    text-align: center;
    height: 60px;
    vertical-align: middle;
}

.data-table td {
    background-color: white;
    border-radius: 8px;
    padding: 16px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-main);
    vertical-align: middle;
}

.data-table td.loud {
    font-weight: 700;
    color: var(--text-main);
}

/* Comparisons */
.comparison-section { margin-top: 40px; }
.comparison-item {
    display: flex;
    gap: 15px;
    margin-bottom: 24px;
}
.comp-dot {
    width: 10px; height: 10px; background: var(--primary); border-radius: 50%;
    margin-top: 8px; flex-shrink: 0;
}
.comp-content { flex: 1; }
.comp-title { font-weight: 600; margin-bottom: 4px; font-size: 18px; }
.comp-desc { opacity: 0.8; font-size: 16px; margin-bottom: 8px; line-height: 1.5; }

.citation-box {
    border-left: 3px solid var(--primary-light);
    padding-top: 4px;
    padding-bottom: 4px;
    padding-left: 15px;
    margin-top: 8px;
    margin-bottom: 16px;
    font-size: 16px;
    font-style: italic;
    opacity: 0.9;
}
.text-link {
    font-style: normal;
}
.text-link a {
    color: #5856D6;
    text-decoration: underline;
    text-underline-offset: 3px;
}
/* Link arrow with fixed color */
.text-link a::after {
    content: '';
    display: inline-block;
    width: 15px;
    height: 12px;
    margin-left: 4px;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='16' fill='none'%3E%3Cpath fill='%235856D6' d='M11.284.261a.892.892 0 0 1 1.261 0l6.748 6.748a1 1 0 0 1 0 1.414l-6.748 6.748a.892.892 0 0 1-1.261-1.261l5.3-5.302H.892a.892.892 0 1 1 0-1.784h15.692l-5.3-5.301a.892.892 0 0 1 0-1.262Z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    width: 275px;
    gap: 20px;
    margin-top: 140px;
    position: sticky;
    top: 20px;
}
.explore-title { color: var(--text-secondary); font-weight: 600; text-transform: uppercase; margin-bottom: 10px;}
.side-card {
    background-color: #f3f4f6;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
    list-style: none; /* Hide default marker */
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.side-card::-webkit-details-marker {
    display: none;
}
.side-card:hover { background-color: #e5e7eb; }
/* Chevron rotation */
.side-card::after {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23080820' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}
details[open] .side-card::after {
    transform: rotate(180deg);
}

.side-card.active { background-color: #c0f500; } /* Keep this if needed, but active state is on links now usually */

/* Sidebar links */
.sidebar-links {
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px; /* Add some space after the summary */
    margin-bottom: 10px;
}
.sidebar-link-item {
    display: flex;
    align-items: flex-start; /* Align to top for multiline */
    gap: 8px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}
.sidebar-link-item:hover {
    background-color: rgba(0,0,0,0.03);
}
.sidebar-link-item.active {
    /* Background removed as requested */
    color: var(--primary);
    font-weight: 600;
}
.sidebar-dot {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: background-color 0.2s;
    flex-shrink: 0; /* Prevent squashing */
    margin-top: 9px; /* Align with first line of text (approx center of 24px line-height) */
}
.sidebar-link-item.active .sidebar-dot {
    background: var(--primary);
}

/* Promo Small - Sidebar */
.promo-small {
    /* Auto layout */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    gap: 10px;

    width: 100%;
    min-height: 196.63px;
    height: auto;

    /* Gradient */
    background: linear-gradient(90deg, #64D9FF 0%, #CAFF0A 100%);
    border-radius: 30px;

    /* Layout positioning */
    flex: none;
    flex-grow: 0;
    margin-top: 20px;
    
    /* Text styling */
    font-size: 24px;
    font-weight: normal;
    text-transform: uppercase;
    font-family: var(--font-title);
    font-style: normal;
    line-height: 1.2;
    color: black;
    text-align: center;
}

/* ===========================================
   MOBILE STYLES (max-width: 768px)
   Compact layout with reduced spacing
   =========================================== */

@media (max-width: 768px) {
    /* Header - simplified on mobile */
    .site-header {
        padding: 16px;
    }
    
    .onbalance-logo {
        height: 28px;
    }
    
    /* Hide store buttons in header on mobile */
    .header-actions {
        display: none;
    }
    
    /* Container */
    .container {
        padding: 0 16px 0px;
    }
    
    /* Content wrapper */
    .content-wrapper {
        margin-top: 40px;
        gap: 12px;
    }
    
    /* Typography - slightly reduced but still prominent */
    h1.article-title {
        font-size: 36px;
        margin-bottom: 16px;
        line-height: 1.15;
    }
    
    h2 {
        font-size: 28px;
        margin-top: 24px;
        margin-bottom: 16px;
    }
    
    h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .intro-text {
        font-size: 18px;
        margin-bottom: 24px;
    }
    
    .section-desc {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    /* Article meta */
    .article-meta {
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 24px;
        font-size: 13px;
    }
    
    /* Quote card */
    .quote-card {
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 12px;
    }
    
    .quote-text {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    /* Citation box */
    .citation-box {
        padding-left: 12px;
        font-size: 14px;
        margin-top: 6px;
        margin-bottom: 12px;
    }
    
    /* Comparison items */
    .comparison-item {
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .comp-title {
        font-size: 16px;
    }
    
    .comp-desc {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .comp-dot {
        width: 8px;
        height: 8px;
        margin-top: 6px;
    }
    
    /* Steps */
    .step-list {
        gap: 20px;
        margin-top: 20px;
        margin-bottom: 24px;
    }
    
    .step-head {
        gap: 12px;
    }
    
    .step-num {
        font-size: 28px;
    }
    
    .step-title {
        font-size: 17px;
    }
    
    .step-content {
        font-size: 15px;
    }
    
    /* Table styling - compact */
    .table-scroll-wrapper {
        padding-bottom: 8px;
        margin-bottom: 8px;
    }

    /* Semantic table mobile styles */
    .data-table {
        border-spacing: 4px;
        min-width: auto;
    }
    
    .data-table th {
        font-size: 13px;
        padding: 0 8px;
        border-radius: 6px;
        height: 44px;
    }
    
    .data-table td {
        padding: 8px;
        font-size: 13px;
        border-radius: 6px;
    }
    
    /* Checklist */
    .checklist li {
        padding-left: 24px;
        margin-bottom: 10px;
        font-size: 15px;
    }
    
    .checklist li::before {
        font-size: 16px;
    }

    .article-list li {
        padding-left: 24px;
        margin-bottom: 10px;
        font-size: 15px;
    }

    .article-list li::before {
        width: 16px;
        height: 16px;
    }
    
    /* Section spacing */
    .section-spacing {
        margin-top: 24px;
        margin-bottom: 24px;
    }
    
    .section-heading {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    /* Promo banner mobile */
    .promo-banner {
        padding: 28px 20px 0;
        margin-top: 40px;
        min-height: auto;
        border-radius: 20px;
    }
    
    .promo-text h3 {
        font-size: 20px;
        width: 100%;
    }
    
    .promo-text {
        margin-bottom: 20px;
    }
    
    .store-buttons {
        gap: 10px;
        margin-top: 16px;
    }
    
    .store-btn-lg {
        height: 38px;
    }
    
    .promo-img {
        width: 200px;
    }
    
    /* Spacing utilities override */
    .mb-sm { margin-bottom: 6px; }
    .mb-md { margin-bottom: 12px; }
    .mb-lg { margin-bottom: 18px; }
}

/* Extra small screens */
@media (max-width: 480px) {
    h1.article-title {
        font-size: 30px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .step-num {
        font-size: 24px;
    }
    
    .step-title {
        font-size: 16px;
    }
    
    .promo-text h3 {
        font-size: 18px;
    }
    
    .promo-img {
        width: 180px;
    }
}

/* ===========================================
   Burger Menu & Mobile Navigation
   =========================================== */

/* Hide specific mobile elements by default on desktop */
.burger-btn,
.mobile-menu-header,
.mobile-menu-overlay {
    display: none;
}

@media (max-width: 900px) {
    /* Don't hide sidebar anymore, it becomes the menu */
    .sidebar {
        display: flex; /* Override previous display: none if it exists */
    }
    
    .explore-title {
        display: none;
    }

    /* Burger Button */
    .burger-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 50;
    }

    .burger-line {
        width: 24px;
        height: 2px;
        background-color: var(--text-main);
        border-radius: 2px;
        transition: all 0.3s ease;
        align-self: flex-end; /* Align lines to right for cleaner look, or center */
        align-self: center;
    }

    /* Overlay */
    .mobile-menu-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-menu-overlay.is-visible {
        opacity: 1;
        visibility: visible;
    }

    /* Sidebar becomes Mobile Drawer */
    .sidebar {
        /* Override desktop sidebar styles */
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto; /* Reset */
        width: 85%;
        max-width: 360px;
        background-color: var(--bg-body);
        z-index: 100;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -4px 0 24px rgba(0,0,0,0.15);
        padding: 24px;
        padding-top: 24px; /* Override desktop padding */
        margin-top: 0;
        gap: 0; /* Override desktop gap */
    }
    
    .sidebar.is-open {
        transform: translateX(0);
    }

    /* Mobile Menu Header (inside sidebar) */
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        padding-bottom: 0;
        flex-shrink: 0;
    }

    .mobile-menu-title {
        font-family: var(--font-title);
        font-size: 20px;
        text-transform: uppercase;
        color: var(--text-secondary);
        font-weight: 600;
    }

    .mobile-menu-close {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-main);
        padding: 8px;
        margin-right: -8px; 
        display: flex;
        align-items: center;
        justify-content: center;
        transition: color 0.2s;
        border-radius: 50%;
    }

    .mobile-menu-close:hover {
        background-color: rgba(0,0,0,0.05);
    }

    /* Mobile Content Styling - applied to sidebar content */
    .sidebar {
        overflow-y: auto;
    }
    
    /* Ensure content inside sidebar stacks correctly */
    .sidebar > * {
        flex-shrink: 0;
    }
    
    /* Adjust internal items spacing for mobile */
    .sidebar .side-card {
        margin-bottom: 12px;
        background-color: var(--bg-card-main);
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .sidebar .side-card.active {
        background-color: #c0f500;
        color: black;
    }

    .sidebar .sidebar-links {
        padding-left: 0;
        margin: 8px 0;
        gap: 0;
    }
    
    .sidebar .sidebar-link-item {
        padding: 14px 12px;
        border-radius: 12px;
        transition: background 0.2s;
        font-size: 16px;
        border-bottom: 1px solid rgba(0,0,0,0.03);
    }
    
    .sidebar .sidebar-link-item:last-child {
        border-bottom: none;
    }
    
    .sidebar .sidebar-link-item:active {
        background-color: var(--bg-card-main);
    }

    .sidebar .promo-small {
        margin-top: 20px;
        min-height: auto;
        padding: 24px;
        border-radius: 20px;
        margin-bottom: 20px;
    }

    .sidebar .promo-small .store-buttons-sm {
        margin-top: 16px;
    }
}

/* ===========================================
   FOOTER
   =========================================== */

.site-footer {
    background-color: #ffffff;
}

.footer-inner {
    width: 100%;
    padding: 32px 16px 0;
    position: relative;
    overflow: hidden;
}

.footer-content {
    position: relative;
    z-index: 10;
}

.footer-links {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    column-gap: 0;
    row-gap: 8px;
}

.footer-links li {
    font-size: 12px;
    line-height: 1rem;
}

.footer-links li a {
    font-weight: 700;
}

.footer-links-end {
    justify-self: end;
}

.footer-company {
    padding-bottom: 42vw;
    text-align: center;
}

.footer-logo-sm,
.footer-logo-md,
.footer-logo-lg {
    position: absolute;
    bottom: 0;
    z-index: -10;
    width: 100%;
}

.footer-logo-md,
.footer-logo-lg {
    display: none;
}

.footer-privacy {
    position: absolute;
    bottom: 15.3vw;
    left: 6vw;
    max-width: 55vw;
    transform: rotate(-5deg);
    text-align: center;
    font-size: 2.78vw;
    line-height: 140%;
}

/* sm: 640px */
@media (min-width: 640px) {
    .footer-company {
        padding-bottom: 36.5vw;
        text-align: end;
    }

    .footer-logo-sm {
        display: none;
    }

    .footer-logo-md {
        display: block;
    }

    .footer-privacy {
        bottom: 16.3vw;
        left: 4vw;
        max-width: 40vw;
        font-size: 2vw;
    }
}

/* md: 768px */
@media (min-width: 768px) {
    .footer-inner {
        padding-top: 56px;
    }

    .footer-links {
        margin-left: auto;
        width: 50%;
        column-gap: 24px;
    }

    .footer-links li {
        font-size: 14px;
        line-height: 1.25rem;
    }

    .footer-company {
        padding-bottom: 11.72vw;
    }

    .footer-logo-md {
        display: none;
    }

    .footer-logo-lg {
        display: block;
    }

    .footer-privacy {
        left: 1.953vw;
        max-width: 32.55vw;
        font-size: 1.55vw;
        bottom: 12vw;
    }
}

/* lg: 1024px */
@media (min-width: 1024px) {
    .footer-inner {
        padding-left: 48px;
        padding-right: 48px;
    }

    .footer-links {
        margin-bottom: 12px;
    }

    .footer-privacy {
        bottom: 11.2vw;
        left: 2.8vw;
        max-width: 28vw;
        font-size: 1.4vw;
    }
}

/* btwLgXl: 1152px */
@media (min-width: 1152px) {
    .footer-privacy {
        bottom: 11.4vw;
    }
}

/* xl: 1280px */
@media (min-width: 1280px) {
    .footer-inner {
        padding-top: 80px;
    }

    .footer-links {
        margin-bottom: 16px;
    }

    .footer-company {
        padding-bottom: 11vw;
    }

    .footer-privacy {
        bottom: 11.5625vw;
        left: 3.52vw;
        max-width: 27.35vw;
        font-size: 1.25vw;
    }
}

/* btwXl2xl: 1408px */
@media (min-width: 1408px) {
    .footer-privacy {
        bottom: 11.8vw;
    }
}

/* 2xl: 1536px */
@media (min-width: 1536px) {
    .footer-inner {
        margin: 0 auto;
        max-width: 1536px;
        padding: 96px 112px 0;
    }

    .footer-links li {
        font-size: 18px;
        line-height: 1.75rem;
    }

    .footer-company {
        padding-bottom: 152px;
    }

    .footer-privacy {
        bottom: 168px;
        left: 40px;
        max-width: 400px;
        font-size: 18px;
        line-height: 1.75rem;
    }
}
