/* FONT DEFINITIONS (Montserrat & Lato) */
        @font-face {
          font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap;
          src: url(https://fonts.gstatic.com/s/lato/v24/S6uyw4BMUTPHjx4wXg.woff2) format('woff2');
          ascent-override: 103.52%; descent-override: 26.27%; line-gap-override: 0.00%; size-adjust: 95.64%;
        }
        @font-face {
          font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap;
          src: url(https://fonts.gstatic.com/s/montserrat/v25/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2) format('woff2');
          ascent-override: 92.59%; descent-override: 24.35%; line-gap-override: 0.00%; size-adjust: 100.00%;
        }

        /* CSS VARIABLES & THEME */
        :root {
            --bg-color: #ffffff; --bg-color-rgb: 255, 255, 255; --text-color: #333333; --heading-color: #111111;
            --subtle-bg-color: #f9fafb; --border-color: #e5e7eb; --accent-color: #f04a44;
            --accent-color-rgb: 240, 74, 68;
            --grid-size: 50px; /* Default grid size for visualizer */
        }
        .dark {
            --bg-color: #2d2d2d; --bg-color-rgb: 45, 45, 45; --text-color: #cccccc; --heading-color: #f5f5f5;
            --subtle-bg-color: #3c3c3c; --border-color: #555555;
        }

        /* ACCESSIBILITY & REDUCED MOTION */
        *:focus-visible {
            outline: 3px solid var(--accent-color);
            outline-offset: 2px;
            border-radius: 0.25rem;
        }
        @media (prefers-reduced-motion: reduce) {
            html { scroll-behavior: auto; }
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }

        /* BASE & RESET STYLES */
        *, *::before, *::after { box-sizing: border-box; }
        html { scroll-behavior: smooth; overflow-x: hidden; }
        body {
            margin: 0; font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background-color: var(--bg-color); color: var(--text-color);
            transition: background-color 0.2s, color 0.2s; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
            overflow-x: hidden; /* Fallback for safety */
        }
        img, svg { max-width: 100%; height: auto; display: block; }
        a { color: inherit; text-decoration: inherit; }
        h1, h2, h3, h4, h5, h6 { font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: var(--heading-color); }
        button { background: none; border: none; padding: 0; cursor: pointer; color: inherit; }

        /* UTILITY CLASSES */
        .container { width: 100%; margin: 0 auto; padding: 0 1rem; }
        @media (min-width: 640px) { .container { max-width: 640px; } }
        @media (min-width: 1024px) { .container { max-width: 900px; } }
        @media (min-width: 1280px) { .container { max-width: 1100px; } }

        /* HEADER & NEW NAVIGATION */
        .header { background-color: var(--bg-color); z-index: 50; position: sticky; top: 0; border-bottom: 1px solid var(--border-color); }
        .header__inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; height: 4rem; gap: 1rem; }
        .header__brand { font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 1.25rem; }
        .header__actions { display: flex; align-items: center; gap: 0.5rem; }
        .header__theme-toggle { padding: 0.5rem; border-radius: 9999px; transition: background-color 0.2s; }
        .header__theme-toggle:hover { background-color: var(--subtle-bg-color); }
        .header__theme-toggle svg { width: 1.25rem; height: 1.25rem; }
        #theme-icon-moon { display: none; }
        .dark #theme-icon-moon { display: block; }
        .dark #theme-icon-sun { display: none; }
        
        .main-nav { display: flex; justify-content: center; }
        .main-nav__categories { display: flex; list-style: none; margin: 0; padding: 0; gap: 1.5rem; flex-wrap: wrap; justify-content: center; align-items: center; }
        .main-nav__category-btn { font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 1.125rem; opacity: 0.6; transition: all 0.2s; display: inline-block; padding: 0.25rem 0; }
        .main-nav__category-btn.is-active { opacity: 1; color: var(--accent-color); }
        .main-nav__category-btn:hover { opacity: 1; color: var(--accent-color); }

        .submenu-container {
            background-color: var(--subtle-bg-color);
            border-bottom: 1px solid var(--border-color);
            padding: 0;
            max-height: 0;
            overflow: hidden;
            visibility: hidden;
            transition: max-height 0.3s ease-out, padding 0.3s ease-out, visibility 0.3s;
        }
        .submenu-container.is-visible {
            max-height: 300px; 
            padding: 1rem 0;
            visibility: visible;
        }
        
        .main-nav__submenu { list-style: none; margin: 0; padding: 0; display: none; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1rem; align-items: center; }
        .main-nav__submenu.is-open { display: flex; }
        .main-nav__submenu-link { font-weight: 700; padding: 0.25rem 0.5rem; transition: color 0.2s, background-color 0.2s; border-radius: 0.25rem; }
        .main-nav__submenu-link:hover { color: var(--accent-color); }
        .main-nav__submenu-link.current-page {
            background-color: var(--accent-color);
            color: white;
        }
        .main-nav__submenu-link--view-all {
            width: 100%;
            text-align: center;
            font-weight: 700;
            color: var(--accent-color);
            margin-bottom: 0.75rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--border-color);
        }
        .main-nav__submenu-link--view-all:hover {
            background-color: rgba(var(--accent-color-rgb), 0.1);
        }

        /* BREADCRUMBS */
        #breadcrumbs-container {
            background-color: var(--subtle-bg-color);
            padding: 0.75rem 0;
            border-bottom: 1px solid var(--border-color);
        }
        .breadcrumb-list {
            display: flex;
            flex-wrap: wrap;
            list-style: none;
            margin: 0;
            padding: 0;
            font-size: 0.875rem;
        }
        .breadcrumb-item {
            display: flex;
            align-items: center;
        }
        .breadcrumb-item a {
            color: var(--text-color);
            opacity: 0.7;
            text-decoration: none;
            transition: opacity 0.2s;
        }
        .breadcrumb-item a:hover {
            opacity: 1;
            text-decoration: underline;
        }
        .breadcrumb-item:not(:last-child)::after {
            content: '>';
            margin: 0 0.5rem;
            color: var(--text-color);
            opacity: 0.5;
        }
        .breadcrumb-item.is-active span {
            font-weight: 700;
        }

        /* HERO SECTION */
        .hero { background-color: var(--subtle-bg-color); padding: 2rem 0; }
        #format-hero { min-height: 480px; } /* CLS Fix: Reserve space for hero content */
        .hero__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
        @media (min-width: 1024px) { .hero__grid { grid-template-columns: 1fr 1fr; } }
        .hero__title {
            font-size: 3.5rem; margin: 0;
            background: linear-gradient(45deg, var(--accent-color), #f5803e);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-fill-color: transparent;
        }
        @media (max-width: 400px) { .hero__title { font-size: 2.75rem; } }
        .dark .hero__title { filter: saturate(85%); }
        .hero__subtitle { font-size: 1.25rem; font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; margin: 0.5rem 0 1.5rem; opacity: 0.8; }
        .hero__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
        .hero__unit-selector { display: inline-flex; background-color: var(--subtle-bg-color); border-radius: 0.5rem; padding: 0.25rem; border: 1px solid var(--border-color); }
        .hero__unit-selector button { padding: 0.5rem 1rem; border: none; border-radius: 0.375rem; font-weight: 700; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; flex-grow: 1; text-align: center; }
        .hero__unit-selector button.is-active { background-color: var(--accent-color); color: white; box-shadow: 0 2px 8px -1px rgba(0,0,0,0.15); }
        
        .hero__dpi-control {
            display: flex; align-items: center; gap: 0.75rem; max-height: 0; opacity: 0; overflow: hidden;
            transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin-top 0.4s ease-out;
        }
        .hero__dpi-control.is-visible { max-height: 50px; opacity: 1; margin-top: 0.5rem; }
        .hero__dpi-slider { -webkit-appearance: none; appearance: none; width: 150px; height: 6px; background: var(--border-color); border-radius: 3px; outline: none; transition: opacity .2s; }
        .dark .hero__dpi-slider { background: #555; }
        .hero__dpi-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; background: var(--accent-color); cursor: pointer; border-radius: 50%; border: 3px solid var(--bg-color); box-shadow: 0 0 0 1px var(--accent-color); transition: transform 0.2s; }
        .hero__dpi-input { width: 70px; padding: 0.25rem 0.5rem; border: 1px solid var(--border-color); border-radius: 0.25rem; background-color: var(--bg-color); color: var(--text-color); font-weight: 700; text-align: center; }
        .dark .hero__dpi-input { background-color: #4a4a4a; }

        @media (max-width: 1023px) {
            .hero__controls { flex-direction: column; align-items: center; }
            .hero__details { text-align: center; }
        }

        .hero__data-list { list-style: none; padding: 0; margin: 0; }
        .hero__data-item { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px dashed var(--border-color); font-size: 0.9rem; }
        .hero__data-item > div { display: flex; align-items: center; gap: 0.5rem; }
        .hero__data-item span:first-child { font-weight: 700; }
        .hero__visualizer { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 350px; background-color: #2d3748; background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 60%); border-radius: .5rem; padding: 1rem; position: relative; overflow: hidden; transition: box-shadow 0.3s; box-shadow: 0 0 25px -5px rgba(var(--accent-color-rgb), 0.3); }
        .dark .hero__visualizer { background-color: #1a202c; filter: saturate(85%); }
        .hero__visualizer::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px); background-size: var(--grid-size) var(--grid-size); z-index: 0; transition: background-size 0.4s ease-out; }
        .hero__visualizer-controls, .hero__visualizer-wrapper, .hero__visualizer-info { position: relative; z-index: 1; }
        .hero__visualizer-controls { display: flex; gap: .5rem; margin-bottom: 1rem; }
        .hero__visualizer-controls button { font-size: .75rem; padding: .25rem .5rem; border-radius: .25rem; border: 1px solid #666; color: #eee; }
        .hero__visualizer-controls button:hover { background-color: rgba(255,255,255,0.1); }
        .hero__visualizer-controls button.is-active { background-color: var(--accent-color); color: white; border-color: var(--accent-color); }
        .hero__visualizer-wrapper { 
            position: relative; 
            width: 100%; 
            max-width: 300px; 
            aspect-ratio: 1 / 1.414; 
            padding: 1.5rem 0.5rem 1.5rem 1.5rem; 
        }
        .hero__visualizer-ruler {
            position: absolute;
            font-size: 0.75rem;
            color: #ccc;
            opacity: 0.7;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .hero__visualizer-ruler--y { left: 0; top: 1.5rem; bottom: 1.5rem; width: 1.5rem; writing-mode: vertical-rl; text-align: center; transform: rotate(180deg); }
        .hero__visualizer-ruler--x { bottom: 0; left: 1.5rem; right: 0.5rem; height: 1.5rem; text-align: center; }
        .hero__visualizer-grid { display: grid; width: 100%; height: 100%; border: 2px solid rgba(255,255,255,0.3); padding: 4px; gap: 4px; }
        .hero__visualizer-tile { background-color: rgba(var(--accent-color-rgb), 0.3); border: 1px solid rgba(var(--accent-color-rgb), 0.5); }
        
        .hero__visualizer-info {
            margin-top: 1.25rem;
            font-size: 1rem;
            font-weight: 700;
            text-align: center;
            color: #fff;
            background-color: rgba(var(--accent-color-rgb), 0.85);
            padding: 0.5rem 1.25rem;
            border-radius: 9999px;
            display: inline-block;
            box-shadow: 0 4px 10px -2px rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.2);
            line-height: 1.2;
        }
        .viz-info__count, .viz-info__format {
            color: #fff;
            font-weight: 700;
            margin: 0 0.1em;
            padding: 0.1em 0.35em;
            border-radius: 0.25rem;
            background-color: rgba(0,0,0,0.15);
        }
        .hero__visualizer-label {
            position: absolute;
            bottom: 0.5rem;
            right: 0.5rem;
            color: white;
            font-weight: 700;
            font-size: 1rem;
            opacity: 0.6;
            pointer-events: none;
            z-index: 2;
        }
        
        .copy-btn { padding: 0.25rem; border-radius: 0.25rem; transition: background-color 0.2s; position: relative; }
        .copy-btn:hover { background-color: var(--subtle-bg-color); }
        .dark .copy-btn:hover { background-color: #4a4a4a; }
        .copy-btn svg { width: 1rem; height: 1rem; color: var(--text-color); opacity: 0.6; }
        
        .tooltip {
            position: absolute; background-color: var(--heading-color); color: var(--bg-color); padding: 0.25rem 0.5rem; border-radius: 0.25rem; font-size: 0.75rem; font-weight: 700;
            top: 50%; transform: translateY(-50%); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
            z-index: 10; white-space: nowrap; right: 100%; margin-right: 0.5rem;
        }
        .tooltip.is-visible { opacity: 1; visibility: visible; }
        @media (min-width: 1024px) { .tooltip { right: auto; left: 100%; margin-right: 0; margin-left: 0.5rem; } }

        /* ARTICLE CONTENT */
        .article-content { padding-top: 3rem; padding-bottom: 3rem; }
        .article-content__intro-image { margin: 2rem auto 0.5rem; border-radius: 0.5rem; }
        .article-content__caption { font-size: 0.875rem; color: var(--text-color); opacity: 0.7; text-align: center; margin-bottom: 2rem; }
        .article-content__section-title { font-size: 2.5rem; font-weight: 700; margin-top: 3.5rem; margin-bottom: 1.5rem; padding-bottom: 0.75rem; position: relative; border-bottom: 1px solid var(--border-color); scroll-margin-top: 6rem; }
        .article-content__section-title::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100px; height: 3px; background-color: var(--accent-color); }
        .article-content__subsection-title { font-size: 1.5rem; font-weight: 700; margin-top: 2rem; margin-bottom: 1rem; }
        .article-content p, .article-content li { font-size: 1.125rem; line-height: 1.8; margin-bottom: 1.5rem; }
        .article-content ul { list-style-position: inside; padding-left: 0; }
        .article-content .format-link { font-weight: 700; text-decoration: none; }
        .article-content .format-link:hover { text-decoration: underline; }
        @media (max-width: 639px) {
            .article-content__intro-image { width: calc(100% + 2rem); max-width: none; margin-left: -1rem; margin-right: -1rem; border-radius: 0; }
        }

        .toc {
            background-color: var(--subtle-bg-color);
            border: 1px solid var(--border-color);
            border-radius: 0.5rem;
            padding: 1.5rem;
            margin: 2.5rem 0;
        }
        .toc__title {
            font-size: 1.25rem;
            font-weight: 700;
            margin: 0 0 1rem 0;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--border-color);
        }
        .toc__list {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            counter-reset: toc-counter;
        }
        .toc__item::before {
            counter-increment: toc-counter;
            content: counter(toc-counter) ". ";
            font-weight: 700;
            color: var(--accent-color);
            margin-right: 0.5rem;
        }
        .toc__item {
            display: flex;
            align-items: center;
        }
        .toc__link {
            text-decoration: none;
            transition: color 0.2s, text-decoration 0.2s;
            font-size: 1rem;
        }
        .toc__link:hover {
            color: var(--accent-color);
            text-decoration: underline;
        }

        .data-table-wrapper { overflow-x: auto; }
        .data-table { width: 100%; text-align: left; border-collapse: collapse; margin-top: 1.5rem; }
        .data-table th, .data-table td { padding: 0.75rem 1rem; border: 1px solid var(--border-color); }
        .data-table thead { background-color: var(--subtle-bg-color); }
        .data-table tbody tr:nth-child(even) { background-color: var(--subtle-bg-color); }
        @media (max-width: 768px) {
            .data-table thead { display: none; }
            .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
            .data-table tr { margin-bottom: 1rem; border: 1px solid var(--border-color); border-radius: 0.375rem; }
            .data-table td { border: none; border-bottom: 1px dashed var(--border-color); text-align: right; position: relative; padding-left: 50%; }
            .data-table td:last-child { border-bottom: none; }
            .data-table td::before { content: attr(data-label); position: absolute; left: 1rem; width: calc(50% - 2rem); text-align: left; font-weight: 700; white-space: nowrap; }
        }

        .section-header {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: baseline;
            gap: 1rem;
        }
        #telechargements .article-content__section-title {
            margin-bottom: 0;
        }

        .download-section { margin-top: 1.5rem; }
        .download-all-btn {
            background-color: var(--accent-color); color: white; padding: 0.5rem 1rem; border-radius: 0.375rem;
            font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem;
            transition: background-color 0.2s, box-shadow 0.2s;
            white-space: nowrap;
        }
        .download-all-btn:hover { box-shadow: 0 4px 12px -2px rgba(var(--accent-color-rgb), 0.4); }
        .dark .download-all-btn { filter: saturate(85%); }

        .download-group { background-color: var(--subtle-bg-color); border: 1px solid var(--border-color); border-radius: 0.5rem; margin-bottom: 1.5rem; }
        .dark .download-group { background-color: #3c3c3c; }
        .download-group__header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color); }
        .download-group__title { font-size: 1.25rem; margin: 0; display: flex; align-items: center; gap: 0.75rem; }
        .download-group__content { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 1.5rem; }
        .download-subgroup__title { font-weight: 700; margin: 0 0 0.75rem 0; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color); }
        .download-subgroup__items { 
            display: flex; flex-direction: column; gap: 0; background-color: transparent; 
            border: 1px solid var(--border-color); border-radius: 0.375rem; overflow: hidden; 
        }
        .download-item { 
            display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; 
            background-color: var(--bg-color); padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color);
        }
        .download-item:last-child { border-bottom: 0; }
        .dark .download-item { background-color: #2d2d2d; }
        .download-item__info { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.9rem; }
        .download-item__links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
        .download-item__link {
            display: inline-flex; align-items: center; gap: 0.35rem; background-color: var(--subtle-bg-color);
            border: 1px solid var(--border-color); padding: 0.25rem 0.6rem; border-radius: 0.25rem;
            font-size: 0.8rem; font-weight: 700; text-decoration: none; transition: all 0.2s;
        }
        .download-item__link:hover {
            background-color: var(--accent-color); border-color: var(--accent-color); color: white;
            box-shadow: 0 2px 8px -1px rgba(var(--accent-color-rgb), 0.3);
        }
        .dark .download-item__link:hover { filter: saturate(85%); }
        .dark .download-item__link { background-color: #4a4a4a; }

        .full-width-section { padding: 3rem 0; background-color: rgba(var(--accent-color-rgb), 0.05); }
        .dark .full-width-section { background-color: rgba(var(--accent-color-rgb), 0.1); }
        .full-width-section .article-content__section-title { margin-top: 0; }
        .scale-comparison__grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 1.5rem; }
        @media (min-width: 768px) { .scale-comparison__grid { grid-template-columns: 1fr 1fr; } }
        .scale-card { display: flex; align-items: center; gap: 1.5rem; background-color: var(--bg-color); padding: 1.5rem; border-radius: 0.5rem; border: 1px solid var(--border-color); }
        .dark .scale-card { background-color: #3c3c3c; }
        .scale-card__icon { color: var(--accent-color); }
        .scale-card__title { font-size: 1.125rem; margin: 0 0 0.25rem 0; }
        .scale-card__text p { font-size: 0.9rem; line-height: 1.6; margin: 0; opacity: 0.8; }

        /* FOOTER */
        .footer { background-color: var(--subtle-bg-color); padding: 3rem 0; }
        .footer__inner { text-align: center; }
        .footer-groups-container { display: flex; flex-direction: column; gap: 2.5rem; margin-bottom: 2.5rem; }
        .footer-group__title { font-weight: 700; font-size: 1.25rem; margin-bottom: 1rem; text-align: left; }
        .footer__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 0.75rem; }
        .footer__card {
            border-radius: 0.375rem; padding: 0.75rem; font-weight: 700; color: white !important;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .footer__card:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 12px -2px rgba(var(--accent-color-rgb), 0.4);
        }
        .dark .footer__card:hover { filter: saturate(85%); }
        .footer__copyright { font-size: 0.875rem; opacity: 0.7; }

        .footer__grid--summary {
            grid-template-columns: 1fr;
            gap: 1rem;
        }
        .footer__grid--summary .footer__card {
            padding: 1.5rem 1rem;
            text-align: center;
            font-size: 1.125rem;
        }
        @media (min-width: 768px) {
            .footer__grid--summary {
                grid-template-columns: repeat(3, 1fr);
            }
        }
        
        /* MOBILE & RESPONSIVE MENU FIXES */
        @media (max-width: 768px) {
            .main-nav__categories {
                gap: 0.5rem;
                justify-content: space-around;
                flex-wrap: nowrap;
            }
            .main-nav__category-btn {
                font-size: 1rem;
                padding: 0.25rem 0.5rem;
            }
            .submenu-container.is-visible {
                max-height: 50vh;
                overflow-y: auto;
            }
            .main-nav__submenu.is-open {
                gap: 0.25rem 0.5rem; /* Tighter gap for mobile */
                padding: 0.5rem;
            }
            .main-nav__submenu-link {
                font-size: 0.8rem; /* Smaller font for mobile */
                padding: 0.1rem 0.4rem;
            }
            .main-nav__submenu-link--view-all {
                font-size: 0.9rem;
                padding: 0.5rem;
            }
        }
        
        /* BACK TO TOP BUTTON */
        .back-to-top {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background-color: var(--heading-color);
            color: var(--bg-color);
            border: 2px solid var(--bg-color);
            border-radius: 50%;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transform: translateY(20px);
            transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background-color 0.2s;
            box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        }
        .back-to-top:hover {
            background-color: var(--accent-color);
            border-color: var(--bg-color);
        }
        .back-to-top.is-visible {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }
        .back-to-top svg {
          width: 24px;
          height: 24px;
        }
        
        /* HOMEPAGE SPECIFIC STYLES */
        .placeholder-section { background-color: var(--subtle-bg-color); border: 2px dashed var(--border-color); border-radius: 0.5rem; padding: 2rem; margin: 2rem 0; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; color: var(--text-color); opacity: 0.7; }
        .dark .placeholder-section { background-color: rgba(255, 255, 255, 0.05); }
        .project-guide__grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 1.5rem; }
        @media (min-width: 768px) { .project-guide__grid { grid-template-columns: 1fr 1fr; } }
        .project-card { display: flex; align-items: flex-start; gap: 1.5rem; background-color: var(--subtle-bg-color); padding: 1.5rem; border-radius: 0.5rem; border: 1px solid var(--border-color); }
        .project-card__icon { color: var(--accent-color); font-size: 2.5rem; margin-top: 0.25rem; }
        .project-card__title { font-size: 1.25rem; margin: 0 0 0.5rem 0; color: var(--heading-color); }
        .project-card__text p { font-size: 1rem; line-height: 1.6; margin: 0; opacity: 0.9; }
        .dark .project-card { background-color: #3c3c3c; }
        .expert-guide__grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 1.5rem; }
        @media (min-width: 1024px) { .expert-guide__grid { grid-template-columns: repeat(3, 1fr); } }
        .expert-card { background-color: var(--subtle-bg-color); border-left: 4px solid var(--accent-color); padding: 1.5rem; border-radius: 0 0.5rem 0.5rem 0; }
        .dark .expert-card { background-color: #3c3c3c; }
        .expert-card__title { font-size: 1.25rem; margin: 0 0 0.75rem 0; }
        .expert-card p { font-size: 1rem; line-height: 1.7; margin: 0; }
        .faq__list { display: flex; flex-direction: column; gap: 2rem; margin-top: 1.5rem; }
        .faq__item { border-bottom: 1px solid var(--border-color); padding-bottom: 1.5rem; }
        .faq__item:last-child { border-bottom: none; }
        .faq__question { font-size: 1.5rem; margin: 0 0 1rem 0; position: relative; padding-left: 2rem; }
        .faq__question::before { content: '?'; position: absolute; left: 0; top: 50%; transform: translateY(-50%); font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--accent-color); font-size: 1.5rem; }
        .faq__item p { font-size: 1.125rem; line-height: 1.8; margin: 0; }
        #interactive-comparator { scroll-margin-top: 5rem; }
        #interactive-comparator > p { font-size: 1.125rem; line-height: 1.8; margin-bottom: 2rem; max-width: 80ch; }
        .comparator { background-color: var(--subtle-bg-color); border: 1px solid var(--border-color); border-radius: 0.5rem; padding: 1.5rem; }
        .dark .comparator { background-color: #3c3c3c; }
        .comparator__controls { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 1.5rem; }
        @media (min-width: 768px) { .comparator__controls { flex-direction: row; justify-content: space-around; } }
        .comparator__selector-group { flex: 1; }
        .comparator__selector-title { font-size: 1.25rem; margin: 0 0 1rem 0; border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem; }
        .comparator__buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
        .comparator__buttons button { font-weight: 700; font-size: 0.875rem; padding: 0.5rem 0.75rem; border: 1px solid var(--border-color); border-radius: 0.375rem; background-color: var(--bg-color); transition: all 0.2s; }
        .dark .comparator__buttons button { background-color: #4a4a4a; }
        .comparator__buttons button:hover { background-color: var(--accent-color); border-color: var(--accent-color); color: white; }
        .comparator__buttons button.is-active { background-color: var(--accent-color); border-color: var(--accent-color); color: white; box-shadow: 0 2px 8px -1px rgba(var(--accent-color-rgb), 0.3); }
        .comparator__visualizer-wrapper { display: flex; justify-content: center; align-items: center; min-height: 300px; background-color: #2d3748; border-radius: 0.5rem; padding: 1rem; background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px); background-size: 40px 40px; overflow: hidden; }
        .dark .comparator__visualizer-wrapper { background-color: #1a202c; }
        .comparator__visualizer-area { position: relative; display: flex; justify-content: center; align-items: center; gap: 1.5rem; transform-style: preserve-3d; perspective: 800px; }
        .comparator__paper { position: relative; display: flex; justify-content: center; align-items: center; transition: width 0.4s ease, height 0.4s ease, background-color 0.4s ease; box-shadow: 0 10px 20px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.5); }
        .comparator__paper-label { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.5rem; color: white; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
        .comparator__result-text { font-size: 1.25rem; font-weight: 700; text-align: center; margin-top: 1.5rem; background-color: var(--accent-color); color: white; padding: 0.75rem; border-radius: 0.375rem; }
        .dark .comparator__result-text { filter: saturate(85%); }
        
/* --- START: Format Division Animation --- */
.format-division-animation {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--subtle-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}
.dark .format-division-animation {
    background-color: #3c3c3c;
}
.format-division-animation__title {
    font-size: 1.5rem;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--heading-color);
}
.format-division-animation {
    --total-duration: 32s;
    --step-duration: 4s;
    --color-a0: #f04a44;
    --color-a1: #f5803e;
    --color-a2: #f7a13c;
    --color-a3: #f8c046;
    --color-a4: #e5d161;
    --color-a5: #b3c96b;
    --border-color-anim: #444;
}
.format-division-animation .animation-wrapper {
    transform: scale(0.85);
    margin: 0 auto;
    max-width: 400px;
}
.format-division-animation .scene {
    width: 90vw;
    max-width: 400px;
    aspect-ratio: 1 / 1.414;
    position: relative;
    background-color: #e9e4d9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80' width='80' height='80'%3E%3Crect fill='%23e9e4d9' width='80' height='80'/%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23e4d9c7' fill-opacity='0.4'%3E%3Cpath d='M80 80V0h-2L0 80h2l4-4h4l4-4h4l4-4h4l4-4h4l4-4h4l4-4h4l4-4h4l4-4h4l4-4h4l4-4h2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2L80 80z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    border-radius: 12px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0,0,0,0.05);
}
.dark .format-division-animation .scene {
    background-color: #4a4a4a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80' width='80' height='80'%3E%3Crect fill='%234a4a4a' width='80' height='80'/%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23404040' fill-opacity='0.4'%3E%3Cpath d='M80 80V0h-2L0 80h2l4-4h4l4-4h4l4-4h4l4-4h4l4-4h4l4-4h4l4-4h4l4-4h4l4-4h4l4-4h2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2h-2v2L80 80z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.format-division-animation .persistent-a0-background {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border: 3px solid var(--color-a0); border-radius: 10px; box-sizing: border-box;
    display: flex; align-items: flex-end; justify-content: flex-end;
}
.format-division-animation .persistent-a0-background .main-format-label { color: var(--color-a0); }
.format-division-animation .stage {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0;
    animation: cycle-stages var(--total-duration) infinite; animation-delay: var(--delay);
}
@keyframes cycle-stages {
    0%, 11%   { opacity: 1; }
    12.5%, 100% { opacity: 0; }
}
.format-division-animation .paper-border {
    position: absolute; top: 0; left: 0;
    border: 2px solid var(--border-color-anim);
    border-radius: 4px; box-shadow: 0 10px 25px -15px rgba(0, 0, 0, 0.2);
    background-color: rgba(var(--bg-color-rgb),0.3);
    box-sizing: border-box;
}
.format-division-animation .main-format-label {
    position: absolute; bottom: 2px; right: 8px; font-weight: 700;
    color: var(--border-color-anim); text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}
.dark .format-division-animation .main-format-label { color: var(--text-color); }
.format-division-animation .count-label {
    position: absolute; top: 8px; left: 10px; font-weight: 700; opacity: 0;
    animation: fade-in-sub var(--step-duration) ease-out forwards; animation-delay: inherit;
}
.format-division-animation .sub-format-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: grid; gap: 3px; padding: 3px; box-sizing: border-box;
}
.format-division-animation .sub-format {
    display: flex; justify-content: center; align-items: center;
    font-weight: 700; border-radius: 2px; border: 2px solid; opacity: 0;
    background: linear-gradient(to bottom, var(--color-bg-start), var(--color-bg-end));
    border-color: var(--color-border); color: var(--color-text);
    animation: fade-in-sub var(--step-duration) ease-out forwards; animation-delay: inherit;
}
.format-division-animation .sub-format:nth-child(2) { animation-delay: calc(var(--delay) + 0.2s); }
@keyframes fade-in-sub {
    0%   { opacity: 0; transform: scale(0.95) translateY(10px); }
    25%  { opacity: 1; transform: scale(1) translateY(0); }
    100% { opacity: 1; }
}
#stage-A0 { --delay: calc(var(--step-duration) * 0); }
#stage-A1, #stage-A1-rev { --delay: calc(var(--step-duration) * 1); }
#stage-A2, #stage-A2-rev { --delay: calc(var(--step-duration) * 2); }
#stage-A3, #stage-A3-rev { --delay: calc(var(--step-duration) * 3); }
#stage-A4 { --delay: calc(var(--step-duration) * 4); }
#stage-A3-rev { --delay: calc(var(--step-duration) * 5); }
#stage-A2-rev { --delay: calc(var(--step-duration) * 6); }
#stage-A1-rev { --delay: calc(var(--step-duration) * 7); }
#stage-A0 .sub-format-container { grid-template-rows: 1fr 1fr; }
#stage-A0 .sub-format {
    font-size: clamp(1.5rem, 15vw, 6rem); --color-text: var(--color-a1);
    --color-border: var(--color-a1); --color-bg-start: hsl(20, 90%, 98%); --color-bg-end: hsl(20, 90%, 95%);
}
.dark #stage-A0 .sub-format { --color-bg-start: #443e3a; --color-bg-end: #3c3734; }
#stage-A1 .paper-border, #stage-A1-rev .paper-border { width: 100%; height: 50%; }
#stage-A1 .main-format-label, #stage-A1-rev .main-format-label { font-size: clamp(1rem, 8vw, 1.5rem); }
#stage-A1 .count-label, #stage-A1-rev .count-label { font-size: clamp(0.7rem, 4vw, 1rem); color: var(--color-a1); }
#stage-A1 .sub-format-container, #stage-A1-rev .sub-format-container { grid-template-columns: 1fr 1fr; }
#stage-A1 .sub-format, #stage-A1-rev .sub-format {
    font-size: clamp(1.2rem, 12vw, 5rem); --color-text: var(--color-a2);
    --color-border: var(--color-a2); --color-bg-start: hsl(35, 92%, 98%); --color-bg-end: hsl(35, 92%, 95%);
}
.dark #stage-A1 .sub-format, .dark #stage-A1-rev .sub-format { --color-bg-start: #45413a; --color-bg-end: #3d3a34; }
#stage-A2 .paper-border, #stage-A2-rev .paper-border { width: 50%; height: 50%; }
#stage-A2 .main-format-label, #stage-A2-rev .main-format-label { font-size: clamp(0.8rem, 6vw, 1.2rem); }
#stage-A2 .count-label, #stage-A2-rev .count-label { font-size: clamp(0.6rem, 3vw, 0.9rem); color: var(--color-a2); }
#stage-A2 .sub-format-container, #stage-A2-rev .sub-format-container { grid-template-rows: 1fr 1fr; }
#stage-A2 .sub-format, #stage-A2-rev .sub-format {
    font-size: clamp(1rem, 10vw, 4rem); --color-text: var(--color-a3);
    --color-border: var(--color-a3); --color-bg-start: hsl(45, 93%, 98%); --color-bg-end: hsl(45, 93%, 95%);
}
.dark #stage-A2 .sub-format, .dark #stage-A2-rev .sub-format { --color-bg-start: #46443a; --color-bg-end: #3e3c34; }
#stage-A3 .paper-border, #stage-A3-rev .paper-border { width: 50%; height: 25%; }
#stage-A3 .main-format-label, #stage-A3-rev .main-format-label { font-size: clamp(0.7rem, 5vw, 1rem); }
#stage-A3 .count-label, #stage-A3-rev .count-label { font-size: clamp(0.5rem, 2.5vw, 0.8rem); color: var(--color-a3); }
#stage-A3 .sub-format-container, #stage-A3-rev .sub-format-container { grid-template-columns: 1fr 1fr; }
#stage-A3 .sub-format, #stage-A3-rev .sub-format {
    font-size: clamp(0.8rem, 8vw, 3rem); --color-text: var(--color-a4);
    --color-border: var(--color-a4); --color-bg-start: hsl(50, 75%, 98%); --color-bg-end: hsl(50, 75%, 95%);
}
.dark #stage-A3 .sub-format, .dark #stage-A3-rev .sub-format { --color-bg-start: #45453a; --color-bg-end: #3d3d34; }
#stage-A4 .paper-border { width: 25%; height: 25%; }
#stage-A4 .main-format-label { font-size: clamp(0.6rem, 4vw, 0.9rem); }
#stage-A4 .count-label { font-size: clamp(0.4rem, 2vw, 0.7rem); color: var(--color-a4); }
#stage-A4 .sub-format-container { grid-template-rows: 1fr 1fr; }
#stage-A4 .sub-format {
    font-size: clamp(0.7rem, 7vw, 2.5rem); --color-text: var(--color-a5);
    --color-border: var(--color-a5); --color-bg-start: hsl(75, 50%, 98%); --color-bg-end: hsl(75, 50%, 95%);
}
.dark #stage-A4 .sub-format { --color-bg-start: #42453a; --color-bg-end: #3b3d34; }
/* --- END: Format Division Animation --- */