/* guide article: base-conversion-guide-from-scratch */
/* --- CSS Variables (共通設定) --- */
        :root {
            --primary-color: #0056b3;
            --bg-color: #f4f7f9;
            --panel-bg: #ffffff;
            --input-bg: #ffffff;
            --tool-bg: #eef2f5;
            --text-color: #333333;
            --text-muted: #666666;
            --border-color: #dddddd;
            --error-color: #dc3545;
            --success-color: #28a745;
            --warning-bg: rgba(255, 193, 7, 0.15);
            --warning-border: rgba(255, 193, 7, 0.5);
            --warning-text: #856404;
            --hover-bg: #f0f0f0;
            --shadow: 0 2px 8px rgba(0,0,0,0.08);
            --header-height: 60px;
        }

        [data-theme="dark"] {
            --primary-color: #4da3ff;
            --bg-color: #121212;
            --panel-bg: #1e1e1e;
            --input-bg: #2d2d2d;
            --tool-bg: #252525;
            --text-color: #e0e0e0;
            --text-muted: #a0a0a0;
            --border-color: #444444;
            --error-color: #ff6b6b;
            --success-color: #4cd964;
            --warning-bg: rgba(255, 193, 7, 0.1);
            --warning-border: rgba(255, 193, 7, 0.3);
            --warning-text: #ffda6a;
            --hover-bg: #333333;
            --shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        body {
            font-family: "Helvetica Neue", Arial, sans-serif;
            line-height: 1.8;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0; padding: 0;
            transition: background-color 0.3s, color 0.3s;
        }

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

        /* Header */
        header {
            background-color: var(--panel-bg);
            border-bottom: 1px solid var(--border-color);
            height: var(--header-height);
            position: sticky; top: 0; z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .nav-container {
            max-width: 1000px; margin: 0 auto; padding: 0 20px;
            height: 100%; display: flex; justify-content: space-between; align-items: center;
        }
        .logo { font-size: 20px; margin: 0; font-weight: bold; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
        .logo a:hover { text-decoration: none; }

        .nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 20px; }
        .nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .nav-links a:hover { color: var(--primary-color); text-decoration: none; }
        
        .header-actions { display: flex; align-items: center; gap: 10px; }
        #theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 20px; width: 40px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-color); }
        
        /* Hamburger */
        .hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; }
        .hamburger span { width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; }

        /* Breadcrumbs */
        .breadcrumb-nav {
            max-width: 800px;
            margin: 20px auto 0;
            padding: 0 10px;
            font-size: 14px;
            color: var(--text-muted);
        }
        .breadcrumb-nav ol {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .breadcrumb-nav li { display: flex; align-items: center; }
        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin-left: 8px;
            color: var(--border-color);
        }
        .breadcrumb-nav a { color: var(--text-muted); }
        .breadcrumb-nav a:hover { color: var(--primary-color); }
        .breadcrumb-nav span { color: var(--text-color); font-weight: bold; }

        /* Side Floating Menu (Table of Contents) */
        .side-menu {
            position: fixed;
            left: max(20px, calc(50% - 650px));
            top: 165px; 
            width: 200px;
            background-color: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 90;
            overflow: hidden;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }
        .toc-title {
            font-size: 14px;
            font-weight: bold;
            padding: 12px 20px;
            margin: 0;
            background-color: var(--tool-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-muted);
        }
        .side-menu ul { list-style: none; padding: 0; margin: 0; }
        .side-menu li { border-bottom: 1px solid var(--border-color); }
        .side-menu li:last-child { border-bottom: none; }
        .side-menu a {
            display: block; padding: 10px 20px; color: var(--text-color); font-size: 13px; transition: all 0.2s;
            text-decoration: none;
        }
        .side-menu a:hover { background-color: var(--hover-bg); color: var(--primary-color); }
        
        /* Highlight Current Section in TOC */
        .side-menu a.current {
            background-color: rgba(0, 86, 179, 0.08); 
            color: var(--primary-color); 
            font-weight: bold; 
            border-left: 4px solid var(--primary-color); 
            padding-left: 16px;
        }
        [data-theme="dark"] .side-menu a.current { background-color: rgba(77, 163, 255, 0.1); }

        /* Main Content */
        .container {
            max-width: 800px; margin: 20px auto 40px;
            background: var(--panel-bg);
            padding: 40px; border-radius: 8px; box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* Article specific styles */
        h1.article-title {
            margin: 0 0 10px 0;
            font-size: 26px;
            font-weight: bold;
            line-height: 1.4;
            color: var(--text-color);
        }
        .article-date {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 30px;
            display: block;
        }

        h2 {
            margin-top: 50px;
            margin-bottom: 20px;
            font-size: 22px;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid var(--border-color);
            padding-left: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        p { margin-bottom: 1.5em; font-size: 16px; }

        /* Table Styles */
        .conversion-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            font-size: 15px;
        }
        .conversion-table th, .conversion-table td {
            border: 1px solid var(--border-color);
            padding: 12px;
            text-align: center;
        }
        .conversion-table th {
            background-color: var(--tool-bg);
            color: var(--text-muted);
            font-weight: bold;
        }
        .conversion-table tr:nth-child(even) {
            background-color: rgba(0,0,0,0.02);
        }

        /* Example & Concept Box */
        .example-box {
            background-color: var(--tool-bg);
            border-left: 4px solid var(--primary-color);
            padding: 20px;
            margin: 20px 0;
            border-radius: 0 6px 6px 0;
        }
        .concept-visual {
            background: var(--bg-color);
            padding: 15px;
            border-radius: 6px;
            border: 1px dashed var(--border-color);
            text-align: center;
            font-family: monospace;
            font-size: 18px;
            margin: 10px 0;
        }

        /* Code Block (Pre) */
        pre {
            background-color: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 6px;
            overflow-x: auto;
            font-family: "Consolas", "Monaco", "Courier New", monospace;
            font-size: 14px;
            line-height: 1.6;
            margin: 20px 0;
            border: 1px solid var(--border-color);
        }
        [data-theme="light"] pre {
            background-color: #2d2d2d;
        }

        /* CTA Box */
        .cta-box {
            background-color: rgba(0, 86, 179, 0.08);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            margin: 40px 0;
        }
        .cta-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px 35px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 16px;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
        .cta-btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
            color: #fff;
        }

        /* Footer */
        footer { background-color: var(--tool-bg); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; font-size: 14px; }
        .footer-content { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
        .footer-links { display: flex; gap: 20px; font-size: 12px; } 
        .footer-links a { color: var(--text-muted); }
        .copyright { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

        /* Back to top */
        #back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
            background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%;
            cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
            z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        #back-to-top.show { opacity: 1; visibility: visible; }

        /* Mobile */
        @media (max-width: 1200px) {
            .side-menu { display: none; } /* Hide TOC on mobile/tablet */
        }

        @media (max-width: 600px) {
            .container { padding: 25px; margin: 20px auto; }
            .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel-bg); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
            .nav-links.active { display: flex; }
            .hamburger { display: flex; }
            .footer-content { flex-direction: column; text-align: center; }
            .footer-links { justify-content: center; }
            .breadcrumb-nav { padding: 0 20px; }
            h1.article-title { font-size: 22px; }
        }

/* guide article: base-system-basics */
/* --- CSS Variables (共通設定) --- */
        :root {
            --primary-color: #0056b3;
            --bg-color: #f4f7f9;
            --panel-bg: #ffffff;
            --input-bg: #ffffff;
            --tool-bg: #eef2f5;
            --text-color: #333333;
            --text-muted: #666666;
            --border-color: #dddddd;
            --error-color: #dc3545;
            --success-color: #28a745;
            --warning-bg: rgba(255, 193, 7, 0.15);
            --warning-border: rgba(255, 193, 7, 0.5);
            --warning-text: #856404;
            --hover-bg: #f0f0f0;
            --shadow: 0 2px 8px rgba(0,0,0,0.08);
            --header-height: 60px;
        }

        [data-theme="dark"] {
            --primary-color: #4da3ff;
            --bg-color: #121212;
            --panel-bg: #1e1e1e;
            --input-bg: #2d2d2d;
            --tool-bg: #252525;
            --text-color: #e0e0e0;
            --text-muted: #a0a0a0;
            --border-color: #444444;
            --error-color: #ff6b6b;
            --success-color: #4cd964;
            --warning-bg: rgba(255, 193, 7, 0.1);
            --warning-border: rgba(255, 193, 7, 0.3);
            --warning-text: #ffda6a;
            --hover-bg: #333333;
            --shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        body {
            font-family: "Helvetica Neue", Arial, sans-serif;
            line-height: 1.8;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0; padding: 0;
            transition: background-color 0.3s, color 0.3s;
        }

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

        /* Header */
        header {
            background-color: var(--panel-bg);
            border-bottom: 1px solid var(--border-color);
            height: var(--header-height);
            position: sticky; top: 0; z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .nav-container {
            max-width: 1000px; margin: 0 auto; padding: 0 20px;
            height: 100%; display: flex; justify-content: space-between; align-items: center;
        }
        .logo { font-size: 20px; margin: 0; font-weight: bold; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
        .logo a:hover { text-decoration: none; }

        .nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 20px; }
        .nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .nav-links a:hover { color: var(--primary-color); text-decoration: none; }
        
        .header-actions { display: flex; align-items: center; gap: 10px; }
        #theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 20px; width: 40px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-color); }
        
        /* Hamburger */
        .hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; }
        .hamburger span { width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; }

        /* Breadcrumbs */
        .breadcrumb-nav {
            max-width: 800px;
            margin: 20px auto 0;
            padding: 0 10px;
            font-size: 14px;
            color: var(--text-muted);
        }
        .breadcrumb-nav ol {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .breadcrumb-nav li { display: flex; align-items: center; }
        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin-left: 8px;
            color: var(--border-color);
        }
        .breadcrumb-nav a { color: var(--text-muted); }
        .breadcrumb-nav a:hover { color: var(--primary-color); }
        .breadcrumb-nav span { color: var(--text-color); font-weight: bold; }

        /* Side Floating Menu (Table of Contents) */
        .side-menu {
            position: fixed;
            left: max(20px, calc(50% - 650px));
            top: 165px; 
            width: 200px;
            background-color: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 90;
            overflow: hidden;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }
        .toc-title {
            font-size: 14px;
            font-weight: bold;
            padding: 12px 20px;
            margin: 0;
            background-color: var(--tool-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-muted);
        }
        .side-menu ul { list-style: none; padding: 0; margin: 0; }
        .side-menu li { border-bottom: 1px solid var(--border-color); }
        .side-menu li:last-child { border-bottom: none; }
        .side-menu a {
            display: block; padding: 10px 20px; color: var(--text-color); font-size: 13px; transition: all 0.2s;
            text-decoration: none;
        }
        .side-menu a:hover { background-color: var(--hover-bg); color: var(--primary-color); }
        
        /* Highlight Current Section in TOC */
        .side-menu a.current {
            background-color: rgba(0, 86, 179, 0.08); 
            color: var(--primary-color); 
            font-weight: bold; 
            border-left: 4px solid var(--primary-color); 
            padding-left: 16px;
        }
        [data-theme="dark"] .side-menu a.current { background-color: rgba(77, 163, 255, 0.1); }

        /* Main Content */
        .container {
            max-width: 800px; margin: 20px auto 40px;
            background: var(--panel-bg);
            padding: 40px; border-radius: 8px; box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* Article specific styles */
        h1.article-title {
            margin: 0 0 10px 0;
            font-size: 26px;
            font-weight: bold;
            line-height: 1.4;
            color: var(--text-color);
        }
        .article-date {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 30px;
            display: block;
        }

        h2 {
            margin-top: 50px;
            margin-bottom: 20px;
            font-size: 22px;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid var(--border-color);
            padding-left: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        p { margin-bottom: 1.5em; font-size: 16px; }

        /* Table Styles */
        .conversion-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            font-size: 15px;
        }
        .conversion-table th, .conversion-table td {
            border: 1px solid var(--border-color);
            padding: 12px;
            text-align: left;
        }
        .conversion-table th {
            background-color: var(--tool-bg);
            color: var(--text-muted);
            font-weight: bold;
            width: 30%;
        }
        .conversion-table tr:nth-child(even) {
            background-color: rgba(0,0,0,0.02);
        }

        /* Code Block (Pre) */
        pre {
            background-color: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 6px;
            overflow-x: auto;
            font-family: "Consolas", "Monaco", "Courier New", monospace;
            font-size: 14px;
            line-height: 1.6;
            margin: 20px 0;
            border: 1px solid var(--border-color);
        }
        [data-theme="light"] pre {
            background-color: #2d2d2d;
        }

        /* CTA Box */
        .cta-box {
            background-color: rgba(0, 86, 179, 0.08);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            margin: 40px 0;
        }
        .cta-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px 35px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 16px;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
        .cta-btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
            color: #fff;
        }

        /* Footer */
        footer { background-color: var(--tool-bg); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; font-size: 14px; }
        .footer-content { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
        .footer-links { display: flex; gap: 20px; font-size: 12px; } 
        .footer-links a { color: var(--text-muted); }
        .copyright { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

        /* Back to top */
        #back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
            background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%;
            cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
            z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        #back-to-top.show { opacity: 1; visibility: visible; }

        /* Mobile */
        @media (max-width: 1200px) {
            .side-menu { display: none; } /* Hide TOC on mobile/tablet */
        }

        @media (max-width: 600px) {
            .container { padding: 25px; margin: 20px auto; }
            .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel-bg); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
            .nav-links.active { display: flex; }
            .hamburger { display: flex; }
            .footer-content { flex-direction: column; text-align: center; }
            .footer-links { justify-content: center; }
            .breadcrumb-nav { padding: 0 20px; }
            h1.article-title { font-size: 22px; }
        }

/* guide article: binary-calculation-method */
/* --- CSS Variables (共通設定) --- */
        :root {
            --primary-color: #0056b3;
            --bg-color: #f4f7f9;
            --panel-bg: #ffffff;
            --input-bg: #ffffff;
            --tool-bg: #eef2f5;
            --text-color: #333333;
            --text-muted: #666666;
            --border-color: #dddddd;
            --error-color: #dc3545;
            --success-color: #28a745;
            --warning-bg: rgba(255, 193, 7, 0.15);
            --warning-border: rgba(255, 193, 7, 0.5);
            --warning-text: #856404;
            --hover-bg: #f0f0f0;
            --shadow: 0 2px 8px rgba(0,0,0,0.08);
            --header-height: 60px;
        }

        [data-theme="dark"] {
            --primary-color: #4da3ff;
            --bg-color: #121212;
            --panel-bg: #1e1e1e;
            --input-bg: #2d2d2d;
            --tool-bg: #252525;
            --text-color: #e0e0e0;
            --text-muted: #a0a0a0;
            --border-color: #444444;
            --error-color: #ff6b6b;
            --success-color: #4cd964;
            --warning-bg: rgba(255, 193, 7, 0.1);
            --warning-border: rgba(255, 193, 7, 0.3);
            --warning-text: #ffda6a;
            --hover-bg: #333333;
            --shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        body {
            font-family: "Helvetica Neue", Arial, sans-serif;
            line-height: 1.8;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0; padding: 0;
            transition: background-color 0.3s, color 0.3s;
        }

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

        /* Header */
        header {
            background-color: var(--panel-bg);
            border-bottom: 1px solid var(--border-color);
            height: var(--header-height);
            position: sticky; top: 0; z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .nav-container {
            max-width: 1000px; margin: 0 auto; padding: 0 20px;
            height: 100%; display: flex; justify-content: space-between; align-items: center;
        }
        .logo { font-size: 20px; margin: 0; font-weight: bold; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
        .logo a:hover { text-decoration: none; }

        .nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 20px; }
        .nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .nav-links a:hover { color: var(--primary-color); text-decoration: none; }
        
        .header-actions { display: flex; align-items: center; gap: 10px; }
        #theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 20px; width: 40px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-color); }
        
        /* Hamburger */
        .hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; }
        .hamburger span { width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; }

        /* Breadcrumbs */
        .breadcrumb-nav {
            max-width: 800px;
            margin: 20px auto 0;
            padding: 0 10px;
            font-size: 14px;
            color: var(--text-muted);
        }
        .breadcrumb-nav ol {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .breadcrumb-nav li { display: flex; align-items: center; }
        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin-left: 8px;
            color: var(--border-color);
        }
        .breadcrumb-nav a { color: var(--text-muted); }
        .breadcrumb-nav a:hover { color: var(--primary-color); }
        .breadcrumb-nav span { color: var(--text-color); font-weight: bold; }

        /* Side Floating Menu (Table of Contents) */
        .side-menu {
            position: fixed;
            left: max(20px, calc(50% - 650px));
            top: 165px; 
            width: 200px;
            background-color: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 90;
            overflow: hidden;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }
        .toc-title {
            font-size: 14px;
            font-weight: bold;
            padding: 12px 20px;
            margin: 0;
            background-color: var(--tool-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-muted);
        }
        .side-menu ul { list-style: none; padding: 0; margin: 0; }
        .side-menu li { border-bottom: 1px solid var(--border-color); }
        .side-menu li:last-child { border-bottom: none; }
        .side-menu a {
            display: block; padding: 10px 20px; color: var(--text-color); font-size: 13px; transition: all 0.2s;
            text-decoration: none;
        }
        .side-menu a:hover { background-color: var(--hover-bg); color: var(--primary-color); }
        
        /* Highlight Current Section in TOC */
        .side-menu a.current {
            background-color: rgba(0, 86, 179, 0.08); 
            color: var(--primary-color); 
            font-weight: bold; 
            border-left: 4px solid var(--primary-color); 
            padding-left: 16px;
        }
        [data-theme="dark"] .side-menu a.current { background-color: rgba(77, 163, 255, 0.1); }

        /* Main Content */
        .container {
            max-width: 800px; margin: 20px auto 40px;
            background: var(--panel-bg);
            padding: 40px; border-radius: 8px; box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* Article specific styles */
        h1.article-title {
            margin: 0 0 10px 0;
            font-size: 26px;
            font-weight: bold;
            line-height: 1.4;
            color: var(--text-color);
        }
        .article-date {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 30px;
            display: block;
        }

        h2 {
            margin-top: 50px;
            margin-bottom: 20px;
            font-size: 22px;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid var(--border-color);
            padding-left: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        p { margin-bottom: 1.5em; font-size: 16px; }

        /* Code Block (Pre) */
        pre {
            background-color: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 6px;
            overflow-x: auto;
            font-family: "Consolas", "Monaco", "Courier New", monospace;
            font-size: 14px;
            line-height: 1.6;
            margin: 20px 0;
            border: 1px solid var(--border-color);
        }
        [data-theme="light"] pre {
            background-color: #2d2d2d; /* Keep code dark for contrast */
        }
        
        /* CTA Box */
        .cta-box {
            background-color: rgba(0, 86, 179, 0.08);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            margin: 40px 0;
        }
        .cta-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px 35px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 16px;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
        .cta-btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
            color: #fff;
        }

        /* Footer */
        footer { background-color: var(--tool-bg); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; font-size: 14px; }
        .footer-content { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
        .footer-links { display: flex; gap: 20px; font-size: 12px; } 
        .footer-links a { color: var(--text-muted); }
        .copyright { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

        /* Back to top */
        #back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
            background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%;
            cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
            z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        #back-to-top.show { opacity: 1; visibility: visible; }

        /* Mobile */
        @media (max-width: 1200px) {
            .side-menu { display: none; } /* Hide TOC on mobile/tablet */
        }

        @media (max-width: 600px) {
            .container { padding: 25px; margin: 20px auto; }
            .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel-bg); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
            .nav-links.active { display: flex; }
            .hamburger { display: flex; }
            .footer-content { flex-direction: column; text-align: center; }
            .footer-links { justify-content: center; }
            .breadcrumb-nav { padding: 0 20px; }
            h1.article-title { font-size: 22px; }
        }

/* guide article: binary-hex-conversion */
/* --- CSS Variables (共通設定) --- */
        :root {
            --primary-color: #0056b3;
            --bg-color: #f4f7f9;
            --panel-bg: #ffffff;
            --input-bg: #ffffff;
            --tool-bg: #eef2f5;
            --text-color: #333333;
            --text-muted: #666666;
            --border-color: #dddddd;
            --error-color: #dc3545;
            --success-color: #28a745;
            --warning-bg: rgba(255, 193, 7, 0.15);
            --warning-border: rgba(255, 193, 7, 0.5);
            --warning-text: #856404;
            --hover-bg: #f0f0f0;
            --shadow: 0 2px 8px rgba(0,0,0,0.08);
            --header-height: 60px;
        }

        [data-theme="dark"] {
            --primary-color: #4da3ff;
            --bg-color: #121212;
            --panel-bg: #1e1e1e;
            --input-bg: #2d2d2d;
            --tool-bg: #252525;
            --text-color: #e0e0e0;
            --text-muted: #a0a0a0;
            --border-color: #444444;
            --error-color: #ff6b6b;
            --success-color: #4cd964;
            --warning-bg: rgba(255, 193, 7, 0.1);
            --warning-border: rgba(255, 193, 7, 0.3);
            --warning-text: #ffda6a;
            --hover-bg: #333333;
            --shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        body {
            font-family: "Helvetica Neue", Arial, sans-serif;
            line-height: 1.8;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0; padding: 0;
            transition: background-color 0.3s, color 0.3s;
        }

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

        /* Header */
        header {
            background-color: var(--panel-bg);
            border-bottom: 1px solid var(--border-color);
            height: var(--header-height);
            position: sticky; top: 0; z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .nav-container {
            max-width: 1000px; margin: 0 auto; padding: 0 20px;
            height: 100%; display: flex; justify-content: space-between; align-items: center;
        }
        .logo { font-size: 20px; margin: 0; font-weight: bold; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
        .logo a:hover { text-decoration: none; }

        .nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 20px; }
        .nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .nav-links a:hover { color: var(--primary-color); text-decoration: none; }
        
        .header-actions { display: flex; align-items: center; gap: 10px; }
        #theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 20px; width: 40px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-color); }
        
        /* Hamburger */
        .hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; }
        .hamburger span { width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; }

        /* Breadcrumbs */
        .breadcrumb-nav {
            max-width: 800px;
            margin: 20px auto 0;
            padding: 0 10px;
            font-size: 14px;
            color: var(--text-muted);
        }
        .breadcrumb-nav ol {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .breadcrumb-nav li { display: flex; align-items: center; }
        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin-left: 8px;
            color: var(--border-color);
        }
        .breadcrumb-nav a { color: var(--text-muted); }
        .breadcrumb-nav a:hover { color: var(--primary-color); }
        .breadcrumb-nav span { color: var(--text-color); font-weight: bold; }

        /* Side Floating Menu (Table of Contents) */
        .side-menu {
            position: fixed;
            left: max(20px, calc(50% - 650px));
            top: 165px; 
            width: 200px;
            background-color: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 90;
            overflow: hidden;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }
        .toc-title {
            font-size: 14px;
            font-weight: bold;
            padding: 12px 20px;
            margin: 0;
            background-color: var(--tool-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-muted);
        }
        .side-menu ul { list-style: none; padding: 0; margin: 0; }
        .side-menu li { border-bottom: 1px solid var(--border-color); }
        .side-menu li:last-child { border-bottom: none; }
        .side-menu a {
            display: block; padding: 10px 20px; color: var(--text-color); font-size: 13px; transition: all 0.2s;
            text-decoration: none;
        }
        .side-menu a:hover { background-color: var(--hover-bg); color: var(--primary-color); }
        
        /* Highlight Current Section in TOC */
        .side-menu a.current {
            background-color: rgba(0, 86, 179, 0.08); 
            color: var(--primary-color); 
            font-weight: bold; 
            border-left: 4px solid var(--primary-color); 
            padding-left: 16px;
        }
        [data-theme="dark"] .side-menu a.current { background-color: rgba(77, 163, 255, 0.1); }

        /* Main Content */
        .container {
            max-width: 800px; margin: 20px auto 40px;
            background: var(--panel-bg);
            padding: 40px; border-radius: 8px; box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* Article specific styles */
        h1.article-title {
            margin: 0 0 10px 0;
            font-size: 26px;
            font-weight: bold;
            line-height: 1.4;
            color: var(--text-color);
        }
        .article-date {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 30px;
            display: block;
        }

        h2 {
            margin-top: 50px;
            margin-bottom: 20px;
            font-size: 22px;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid var(--border-color);
            padding-left: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        p { margin-bottom: 1.5em; font-size: 16px; }

        /* Code Block (Pre) */
        pre {
            background-color: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 6px;
            overflow-x: auto;
            font-family: "Consolas", "Monaco", "Courier New", monospace;
            font-size: 14px;
            line-height: 1.6;
            margin: 20px 0;
            border: 1px solid var(--border-color);
        }
        [data-theme="light"] pre {
            background-color: #2d2d2d;
        }
        
        /* Table Styles for Conversion Chart */
        .conversion-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            font-size: 14px;
        }
        .conversion-table th, .conversion-table td {
            border: 1px solid var(--border-color);
            padding: 12px;
            text-align: center;
        }
        .conversion-table th {
            background-color: var(--tool-bg);
            color: var(--text-muted);
            font-weight: bold;
        }
        .conversion-table tr:nth-child(even) {
            background-color: rgba(0,0,0,0.02);
        }

        /* CTA Box */
        .cta-box {
            background-color: rgba(0, 86, 179, 0.08);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            margin: 40px 0;
        }
        .cta-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px 35px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 16px;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
        .cta-btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
            color: #fff;
        }

        /* Footer */
        footer { background-color: var(--tool-bg); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; font-size: 14px; }
        .footer-content { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
        .footer-links { display: flex; gap: 20px; font-size: 12px; } 
        .footer-links a { color: var(--text-muted); }
        .copyright { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

        /* Back to top */
        #back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
            background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%;
            cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
            z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        #back-to-top.show { opacity: 1; visibility: visible; }

        /* Mobile */
        @media (max-width: 1200px) {
            .side-menu { display: none; } /* Hide TOC on mobile/tablet */
        }

        @media (max-width: 600px) {
            .container { padding: 25px; margin: 20px auto; }
            .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel-bg); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
            .nav-links.active { display: flex; }
            .hamburger { display: flex; }
            .footer-content { flex-direction: column; text-align: center; }
            .footer-links { justify-content: center; }
            .breadcrumb-nav { padding: 0 20px; }
            h1.article-title { font-size: 22px; }
        }

/* guide article: fe-number-conversion */
/* --- CSS Variables (共通設定) --- */
        :root {
            --primary-color: #0056b3;
            --bg-color: #f4f7f9;
            --panel-bg: #ffffff;
            --input-bg: #ffffff;
            --tool-bg: #eef2f5;
            --text-color: #333333;
            --text-muted: #666666;
            --border-color: #dddddd;
            --error-color: #dc3545;
            --success-color: #28a745;
            --warning-bg: rgba(255, 193, 7, 0.15);
            --warning-border: rgba(255, 193, 7, 0.5);
            --warning-text: #856404;
            --hover-bg: #f0f0f0;
            --shadow: 0 2px 8px rgba(0,0,0,0.08);
            --header-height: 60px;
        }

        [data-theme="dark"] {
            --primary-color: #4da3ff;
            --bg-color: #121212;
            --panel-bg: #1e1e1e;
            --input-bg: #2d2d2d;
            --tool-bg: #252525;
            --text-color: #e0e0e0;
            --text-muted: #a0a0a0;
            --border-color: #444444;
            --error-color: #ff6b6b;
            --success-color: #4cd964;
            --warning-bg: rgba(255, 193, 7, 0.1);
            --warning-border: rgba(255, 193, 7, 0.3);
            --warning-text: #ffda6a;
            --hover-bg: #333333;
            --shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        body {
            font-family: "Helvetica Neue", Arial, sans-serif;
            line-height: 1.8;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0; padding: 0;
            transition: background-color 0.3s, color 0.3s;
        }

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

        /* Header */
        header {
            background-color: var(--panel-bg);
            border-bottom: 1px solid var(--border-color);
            height: var(--header-height);
            position: sticky; top: 0; z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .nav-container {
            max-width: 1000px; margin: 0 auto; padding: 0 20px;
            height: 100%; display: flex; justify-content: space-between; align-items: center;
        }
        .logo { font-size: 20px; margin: 0; font-weight: bold; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
        .logo a:hover { text-decoration: none; }

        .nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 20px; }
        .nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .nav-links a:hover { color: var(--primary-color); text-decoration: none; }
        
        .header-actions { display: flex; align-items: center; gap: 10px; }
        #theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 20px; width: 40px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-color); }
        
        /* Hamburger */
        .hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; }
        .hamburger span { width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; }

        /* Breadcrumbs */
        .breadcrumb-nav {
            max-width: 800px;
            margin: 20px auto 0;
            padding: 0 10px;
            font-size: 14px;
            color: var(--text-muted);
        }
        .breadcrumb-nav ol {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .breadcrumb-nav li { display: flex; align-items: center; }
        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin-left: 8px;
            color: var(--border-color);
        }
        .breadcrumb-nav a { color: var(--text-muted); }
        .breadcrumb-nav a:hover { color: var(--primary-color); }
        .breadcrumb-nav span { color: var(--text-color); font-weight: bold; }

        /* Side Floating Menu (Table of Contents) */
        .side-menu {
            position: fixed;
            left: max(20px, calc(50% - 650px));
            top: 165px; 
            width: 200px;
            background-color: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 90;
            overflow: hidden;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }
        .toc-title {
            font-size: 14px;
            font-weight: bold;
            padding: 12px 20px;
            margin: 0;
            background-color: var(--tool-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-muted);
        }
        .side-menu ul { list-style: none; padding: 0; margin: 0; }
        .side-menu li { border-bottom: 1px solid var(--border-color); }
        .side-menu li:last-child { border-bottom: none; }
        .side-menu a {
            display: block; padding: 10px 20px; color: var(--text-color); font-size: 13px; transition: all 0.2s;
            text-decoration: none;
        }
        .side-menu a:hover { background-color: var(--hover-bg); color: var(--primary-color); }
        
        /* Highlight Current Section in TOC */
        .side-menu a.current {
            background-color: rgba(0, 86, 179, 0.08); 
            color: var(--primary-color); 
            font-weight: bold; 
            border-left: 4px solid var(--primary-color); 
            padding-left: 16px;
        }
        [data-theme="dark"] .side-menu a.current { background-color: rgba(77, 163, 255, 0.1); }

        /* Main Content */
        .container {
            max-width: 800px; margin: 20px auto 40px;
            background: var(--panel-bg);
            padding: 40px; border-radius: 8px; box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* Article specific styles */
        h1.article-title {
            margin: 0 0 10px 0;
            font-size: 26px;
            font-weight: bold;
            line-height: 1.4;
            color: var(--text-color);
        }
        .article-date {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 30px;
            display: block;
        }

        h2 {
            margin-top: 50px;
            margin-bottom: 20px;
            font-size: 22px;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid var(--border-color);
            padding-left: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        p { margin-bottom: 1.5em; font-size: 16px; }

        /* Table Styles */
        .conversion-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            font-size: 15px;
        }
        .conversion-table th, .conversion-table td {
            border: 1px solid var(--border-color);
            padding: 12px;
            text-align: left;
        }
        .conversion-table th {
            background-color: var(--tool-bg);
            color: var(--text-muted);
            font-weight: bold;
        }
        .conversion-table tr:nth-child(even) {
            background-color: rgba(0,0,0,0.02);
        }

        /* Example & Question Box */
        .example-box {
            background-color: var(--tool-bg);
            border-left: 4px solid var(--primary-color);
            padding: 20px;
            margin: 20px 0;
            border-radius: 0 6px 6px 0;
        }
        .question-box {
            background-color: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 20px;
            margin: 20px 0;
        }
        .question-title {
            font-weight: bold;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .q-badge {
            background-color: var(--primary-color);
            color: #fff;
            font-size: 12px;
            padding: 2px 8px;
            border-radius: 4px;
        }
        
        details {
            margin-top: 15px;
            border-top: 1px dashed var(--border-color);
            padding-top: 10px;
        }
        summary {
            cursor: pointer;
            color: var(--primary-color);
            font-weight: bold;
            list-style: none;
        }
        summary::-webkit-details-marker { display: none; }
        summary::after { content: " ▼"; font-size: 12px; }
        details[open] summary::after { content: " ▲"; }
        
        .answer-area {
            margin-top: 10px;
            padding: 15px;
            background-color: rgba(40, 167, 69, 0.1);
            border-radius: 4px;
            color: var(--text-color);
        }

        /* Code Block (Pre) */
        pre {
            background-color: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 6px;
            overflow-x: auto;
            font-family: "Consolas", "Monaco", "Courier New", monospace;
            font-size: 14px;
            line-height: 1.6;
            margin: 20px 0;
            border: 1px solid var(--border-color);
        }
        [data-theme="light"] pre {
            background-color: #2d2d2d;
        }

        /* CTA Box */
        .cta-box {
            background-color: rgba(0, 86, 179, 0.08);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            margin: 40px 0;
        }
        .cta-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px 35px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 16px;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
        .cta-btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
            color: #fff;
        }

        /* Footer */
        footer { background-color: var(--tool-bg); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; font-size: 14px; }
        .footer-content { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
        .footer-links { display: flex; gap: 20px; font-size: 12px; } 
        .footer-links a { color: var(--text-muted); }
        .copyright { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

        /* Back to top */
        #back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
            background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%;
            cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
            z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        #back-to-top.show { opacity: 1; visibility: visible; }

        /* Mobile */
        @media (max-width: 1200px) {
            .side-menu { display: none; } /* Hide TOC on mobile/tablet */
        }

        @media (max-width: 600px) {
            .container { padding: 25px; margin: 20px auto; }
            .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel-bg); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
            .nav-links.active { display: flex; }
            .hamburger { display: flex; }
            .footer-content { flex-direction: column; text-align: center; }
            .footer-links { justify-content: center; }
            .breadcrumb-nav { padding: 0 20px; }
            h1.article-title { font-size: 22px; }
        }

/* guide article: hex-calculation-drills */
/* --- CSS Variables (共通設定) --- */
        :root {
            --primary-color: #0056b3;
            --bg-color: #f4f7f9;
            --panel-bg: #ffffff;
            --input-bg: #ffffff;
            --tool-bg: #eef2f5;
            --text-color: #333333;
            --text-muted: #666666;
            --border-color: #dddddd;
            --error-color: #dc3545;
            --success-color: #28a745;
            --warning-bg: rgba(255, 193, 7, 0.15);
            --warning-border: rgba(255, 193, 7, 0.5);
            --warning-text: #856404;
            --hover-bg: #f0f0f0;
            --shadow: 0 2px 8px rgba(0,0,0,0.08);
            --header-height: 60px;
        }

        [data-theme="dark"] {
            --primary-color: #4da3ff;
            --bg-color: #121212;
            --panel-bg: #1e1e1e;
            --input-bg: #2d2d2d;
            --tool-bg: #252525;
            --text-color: #e0e0e0;
            --text-muted: #a0a0a0;
            --border-color: #444444;
            --error-color: #ff6b6b;
            --success-color: #4cd964;
            --warning-bg: rgba(255, 193, 7, 0.1);
            --warning-border: rgba(255, 193, 7, 0.3);
            --warning-text: #ffda6a;
            --hover-bg: #333333;
            --shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        body {
            font-family: "Helvetica Neue", Arial, sans-serif;
            line-height: 1.8;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0; padding: 0;
            transition: background-color 0.3s, color 0.3s;
        }

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

        /* Header */
        header {
            background-color: var(--panel-bg);
            border-bottom: 1px solid var(--border-color);
            height: var(--header-height);
            position: sticky; top: 0; z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .nav-container {
            max-width: 1000px; margin: 0 auto; padding: 0 20px;
            height: 100%; display: flex; justify-content: space-between; align-items: center;
        }
        .logo { font-size: 20px; margin: 0; font-weight: bold; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
        .logo a:hover { text-decoration: none; }

        .nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 20px; }
        .nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .nav-links a:hover { color: var(--primary-color); text-decoration: none; }
        
        .header-actions { display: flex; align-items: center; gap: 10px; }
        #theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 20px; width: 40px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-color); }
        
        /* Hamburger */
        .hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; }
        .hamburger span { width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; }

        /* Breadcrumbs */
        .breadcrumb-nav {
            max-width: 800px;
            margin: 20px auto 0;
            padding: 0 10px;
            font-size: 14px;
            color: var(--text-muted);
        }
        .breadcrumb-nav ol {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .breadcrumb-nav li { display: flex; align-items: center; }
        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin-left: 8px;
            color: var(--border-color);
        }
        .breadcrumb-nav a { color: var(--text-muted); }
        .breadcrumb-nav a:hover { color: var(--primary-color); }
        .breadcrumb-nav span { color: var(--text-color); font-weight: bold; }

        /* Side Floating Menu (Table of Contents) */
        .side-menu {
            position: fixed;
            left: max(20px, calc(50% - 650px));
            top: 165px; 
            width: 200px;
            background-color: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 90;
            overflow: hidden;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }
        .toc-title {
            font-size: 14px;
            font-weight: bold;
            padding: 12px 20px;
            margin: 0;
            background-color: var(--tool-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-muted);
        }
        .side-menu ul { list-style: none; padding: 0; margin: 0; }
        .side-menu li { border-bottom: 1px solid var(--border-color); }
        .side-menu li:last-child { border-bottom: none; }
        .side-menu a {
            display: block; padding: 10px 20px; color: var(--text-color); font-size: 13px; transition: all 0.2s;
            text-decoration: none;
        }
        .side-menu a:hover { background-color: var(--hover-bg); color: var(--primary-color); }
        
        /* Highlight Current Section in TOC */
        .side-menu a.current {
            background-color: rgba(0, 86, 179, 0.08); 
            color: var(--primary-color); 
            font-weight: bold; 
            border-left: 4px solid var(--primary-color); 
            padding-left: 16px;
        }
        [data-theme="dark"] .side-menu a.current { background-color: rgba(77, 163, 255, 0.1); }

        /* Main Content */
        .container {
            max-width: 800px; margin: 20px auto 40px;
            background: var(--panel-bg);
            padding: 40px; border-radius: 8px; box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* Article specific styles */
        h1.article-title {
            margin: 0 0 10px 0;
            font-size: 26px;
            font-weight: bold;
            line-height: 1.4;
            color: var(--text-color);
        }
        .article-date {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 30px;
            display: block;
        }

        h2 {
            margin-top: 50px;
            margin-bottom: 20px;
            font-size: 22px;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid var(--border-color);
            padding-left: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        p { margin-bottom: 1.5em; font-size: 16px; }

        /* Question Box Styles */
        .question-box {
            background-color: var(--bg-color);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 20px;
            margin: 20px 0;
        }
        .question-title {
            font-weight: bold;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .q-badge {
            background-color: var(--primary-color);
            color: #fff;
            font-size: 12px;
            padding: 2px 8px;
            border-radius: 4px;
        }
        
        details {
            margin-top: 15px;
            border-top: 1px dashed var(--border-color);
            padding-top: 10px;
        }
        summary {
            cursor: pointer;
            color: var(--primary-color);
            font-weight: bold;
            list-style: none; /* Remove default triangle in some browsers */
        }
        summary::-webkit-details-marker { display: none; }
        summary::after { content: " ▼"; font-size: 12px; }
        details[open] summary::after { content: " ▲"; }
        
        .answer-area {
            margin-top: 10px;
            padding: 15px;
            background-color: rgba(40, 167, 69, 0.1);
            border-radius: 4px;
            color: var(--text-color);
        }

        /* CTA Box */
        .cta-box {
            background-color: rgba(0, 86, 179, 0.08);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            margin: 40px 0;
        }
        .cta-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px 35px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 16px;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
        .cta-btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
            color: #fff;
        }

        /* Footer */
        footer { background-color: var(--tool-bg); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; font-size: 14px; }
        .footer-content { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
        .footer-links { display: flex; gap: 20px; font-size: 12px; } 
        .footer-links a { color: var(--text-muted); }
        .copyright { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

        /* Back to top */
        #back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
            background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%;
            cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
            z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        #back-to-top.show { opacity: 1; visibility: visible; }

        /* Mobile */
        @media (max-width: 1200px) {
            .side-menu { display: none; } /* Hide TOC on mobile/tablet */
        }

        @media (max-width: 600px) {
            .container { padding: 25px; margin: 20px auto; }
            .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel-bg); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
            .nav-links.active { display: flex; }
            .hamburger { display: flex; }
            .footer-content { flex-direction: column; text-align: center; }
            .footer-links { justify-content: center; }
            .breadcrumb-nav { padding: 0 20px; }
            h1.article-title { font-size: 22px; }
        }

/* guide article: hex-chart */
/* --- CSS Variables (共通設定) --- */
        :root {
            --primary-color: #0056b3;
            --bg-color: #f4f7f9;
            --panel-bg: #ffffff;
            --input-bg: #ffffff;
            --tool-bg: #eef2f5;
            --text-color: #333333;
            --text-muted: #666666;
            --border-color: #dddddd;
            --error-color: #dc3545;
            --success-color: #28a745;
            --warning-bg: rgba(255, 193, 7, 0.15);
            --warning-border: rgba(255, 193, 7, 0.5);
            --warning-text: #856404;
            --hover-bg: #f0f0f0;
            --shadow: 0 2px 8px rgba(0,0,0,0.08);
            --header-height: 60px;
        }

        [data-theme="dark"] {
            --primary-color: #4da3ff;
            --bg-color: #121212;
            --panel-bg: #1e1e1e;
            --input-bg: #2d2d2d;
            --tool-bg: #252525;
            --text-color: #e0e0e0;
            --text-muted: #a0a0a0;
            --border-color: #444444;
            --error-color: #ff6b6b;
            --success-color: #4cd964;
            --warning-bg: rgba(255, 193, 7, 0.1);
            --warning-border: rgba(255, 193, 7, 0.3);
            --warning-text: #ffda6a;
            --hover-bg: #333333;
            --shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        body {
            font-family: "Helvetica Neue", Arial, sans-serif;
            line-height: 1.8;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0; padding: 0;
            transition: background-color 0.3s, color 0.3s;
        }

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

        /* Header */
        header {
            background-color: var(--panel-bg);
            border-bottom: 1px solid var(--border-color);
            height: var(--header-height);
            position: sticky; top: 0; z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .nav-container {
            max-width: 1000px; margin: 0 auto; padding: 0 20px;
            height: 100%; display: flex; justify-content: space-between; align-items: center;
        }
        .logo { font-size: 20px; margin: 0; font-weight: bold; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
        .logo a:hover { text-decoration: none; }

        .nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 20px; }
        .nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .nav-links a:hover { color: var(--primary-color); text-decoration: none; }
        
        .header-actions { display: flex; align-items: center; gap: 10px; }
        #theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 20px; width: 40px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-color); }
        
        /* Hamburger */
        .hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; }
        .hamburger span { width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; }

        /* Breadcrumbs */
        .breadcrumb-nav {
            max-width: 800px;
            margin: 20px auto 0;
            padding: 0 10px;
            font-size: 14px;
            color: var(--text-muted);
        }
        .breadcrumb-nav ol {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .breadcrumb-nav li { display: flex; align-items: center; }
        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin-left: 8px;
            color: var(--border-color);
        }
        .breadcrumb-nav a { color: var(--text-muted); }
        .breadcrumb-nav a:hover { color: var(--primary-color); }
        .breadcrumb-nav span { color: var(--text-color); font-weight: bold; }

        /* Side Floating Menu (Table of Contents) */
        .side-menu {
            position: fixed;
            left: max(20px, calc(50% - 650px));
            top: 165px; 
            width: 200px;
            background-color: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 90;
            overflow: hidden;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }
        .toc-title {
            font-size: 14px;
            font-weight: bold;
            padding: 12px 20px;
            margin: 0;
            background-color: var(--tool-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-muted);
        }
        .side-menu ul { list-style: none; padding: 0; margin: 0; }
        .side-menu li { border-bottom: 1px solid var(--border-color); }
        .side-menu li:last-child { border-bottom: none; }
        .side-menu a {
            display: block; padding: 10px 20px; color: var(--text-color); font-size: 13px; transition: all 0.2s;
            text-decoration: none;
        }
        .side-menu a:hover { background-color: var(--hover-bg); color: var(--primary-color); }
        
        /* Highlight Current Section in TOC */
        .side-menu a.current {
            background-color: rgba(0, 86, 179, 0.08); 
            color: var(--primary-color); 
            font-weight: bold; 
            border-left: 4px solid var(--primary-color); 
            padding-left: 16px;
        }
        [data-theme="dark"] .side-menu a.current { background-color: rgba(77, 163, 255, 0.1); }

        /* Main Content */
        .container {
            max-width: 800px; margin: 20px auto 40px;
            background: var(--panel-bg);
            padding: 40px; border-radius: 8px; box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* Article specific styles */
        h1.article-title {
            margin: 0 0 10px 0;
            font-size: 26px;
            font-weight: bold;
            line-height: 1.4;
            color: var(--text-color);
        }
        .article-date {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 30px;
            display: block;
        }

        h2 {
            margin-top: 50px;
            margin-bottom: 20px;
            font-size: 22px;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid var(--border-color);
            padding-left: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        p { margin-bottom: 1.5em; font-size: 16px; }

        /* Code Block (Pre) */
        pre {
            background-color: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 6px;
            overflow-x: auto;
            font-family: "Consolas", "Monaco", "Courier New", monospace;
            font-size: 14px;
            line-height: 1.6;
            margin: 20px 0;
            border: 1px solid var(--border-color);
        }
        [data-theme="light"] pre {
            background-color: #2d2d2d; /* Keep code dark for contrast */
        }
        
        /* CTA Box */
        .cta-box {
            background-color: rgba(0, 86, 179, 0.08);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            margin: 40px 0;
        }
        .cta-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px 35px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 16px;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
        .cta-btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
            color: #fff;
        }

        /* Footer */
        footer { background-color: var(--tool-bg); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; font-size: 14px; }
        .footer-content { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
        .footer-links { display: flex; gap: 20px; font-size: 12px; } 
        .footer-links a { color: var(--text-muted); }
        .copyright { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

        /* Back to top */
        #back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
            background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%;
            cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
            z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        #back-to-top.show { opacity: 1; visibility: visible; }

        /* Table specific styles for the chart */
        .hex-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            font-size: 15px;
            background-color: var(--panel-bg);
        }
        .hex-table th, .hex-table td {
            border: 1px solid var(--border-color);
            padding: 10px;
            text-align: center;
        }
        .hex-table th {
            background-color: var(--tool-bg);
            font-weight: bold;
            position: sticky;
            top: 60px; /* Header height offset */
        }
        .hex-table tr:nth-child(even) {
            background-color: var(--hover-bg);
        }
        .highlight-row {
            background-color: rgba(255, 193, 7, 0.1) !important;
            font-weight: bold;
        }

        /* Mobile */
        @media (max-width: 1200px) {
            .side-menu { display: none; } /* Hide TOC on mobile/tablet */
        }

        @media (max-width: 600px) {
            .container { padding: 25px; margin: 20px auto; }
            .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel-bg); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
            .nav-links.active { display: flex; }
            .hamburger { display: flex; }
            .footer-content { flex-direction: column; text-align: center; }
            .footer-links { justify-content: center; }
            .breadcrumb-nav { padding: 0 20px; }
            h1.article-title { font-size: 22px; }
            .hex-table { font-size: 12px; }
            .hex-table th, .hex-table td { padding: 6px 2px; }
        }

/* guide article: hex-conversion-error */
/* --- CSS Variables (共通設定) --- */
        :root {
            --primary-color: #0056b3;
            --bg-color: #f4f7f9;
            --panel-bg: #ffffff;
            --input-bg: #ffffff;
            --tool-bg: #eef2f5;
            --text-color: #333333;
            --text-muted: #666666;
            --border-color: #dddddd;
            --error-color: #dc3545;
            --success-color: #28a745;
            --warning-bg: rgba(255, 193, 7, 0.15);
            --warning-border: rgba(255, 193, 7, 0.5);
            --warning-text: #856404;
            --hover-bg: #f0f0f0;
            --shadow: 0 2px 8px rgba(0,0,0,0.08);
            --header-height: 60px;
        }

        [data-theme="dark"] {
            --primary-color: #4da3ff;
            --bg-color: #121212;
            --panel-bg: #1e1e1e;
            --input-bg: #2d2d2d;
            --tool-bg: #252525;
            --text-color: #e0e0e0;
            --text-muted: #a0a0a0;
            --border-color: #444444;
            --error-color: #ff6b6b;
            --success-color: #4cd964;
            --warning-bg: rgba(255, 193, 7, 0.1);
            --warning-border: rgba(255, 193, 7, 0.3);
            --warning-text: #ffda6a;
            --hover-bg: #333333;
            --shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        body {
            font-family: "Helvetica Neue", Arial, sans-serif;
            line-height: 1.8;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0; padding: 0;
            transition: background-color 0.3s, color 0.3s;
        }

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

        /* Header */
        header {
            background-color: var(--panel-bg);
            border-bottom: 1px solid var(--border-color);
            height: var(--header-height);
            position: sticky; top: 0; z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .nav-container {
            max-width: 1000px; margin: 0 auto; padding: 0 20px;
            height: 100%; display: flex; justify-content: space-between; align-items: center;
        }
        .logo { font-size: 20px; margin: 0; font-weight: bold; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
        .logo a:hover { text-decoration: none; }

        .nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 20px; }
        .nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .nav-links a:hover { color: var(--primary-color); text-decoration: none; }
        
        .header-actions { display: flex; align-items: center; gap: 10px; }
        #theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 20px; width: 40px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-color); }
        
        /* Hamburger */
        .hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; }
        .hamburger span { width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; }

        /* Breadcrumbs */
        .breadcrumb-nav {
            max-width: 800px;
            margin: 20px auto 0;
            padding: 0 10px;
            font-size: 14px;
            color: var(--text-muted);
        }
        .breadcrumb-nav ol {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .breadcrumb-nav li { display: flex; align-items: center; }
        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin-left: 8px;
            color: var(--border-color);
        }
        .breadcrumb-nav a { color: var(--text-muted); }
        .breadcrumb-nav a:hover { color: var(--primary-color); }
        .breadcrumb-nav span { color: var(--text-color); font-weight: bold; }

        /* Side Floating Menu (Table of Contents) */
        .side-menu {
            position: fixed;
            left: max(20px, calc(50% - 650px));
            top: 165px; 
            width: 200px;
            background-color: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 90;
            overflow: hidden;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }
        .toc-title {
            font-size: 14px;
            font-weight: bold;
            padding: 12px 20px;
            margin: 0;
            background-color: var(--tool-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-muted);
        }
        .side-menu ul { list-style: none; padding: 0; margin: 0; }
        .side-menu li { border-bottom: 1px solid var(--border-color); }
        .side-menu li:last-child { border-bottom: none; }
        .side-menu a {
            display: block; padding: 10px 20px; color: var(--text-color); font-size: 13px; transition: all 0.2s;
            text-decoration: none;
        }
        .side-menu a:hover { background-color: var(--hover-bg); color: var(--primary-color); }
        
        /* Highlight Current Section in TOC */
        .side-menu a.current {
            background-color: rgba(0, 86, 179, 0.08); 
            color: var(--primary-color); 
            font-weight: bold; 
            border-left: 4px solid var(--primary-color); 
            padding-left: 16px;
        }
        [data-theme="dark"] .side-menu a.current { background-color: rgba(77, 163, 255, 0.1); }

        /* Main Content */
        .container {
            max-width: 800px; margin: 20px auto 40px;
            background: var(--panel-bg);
            padding: 40px; border-radius: 8px; box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* Article specific styles */
        h1.article-title {
            margin: 0 0 10px 0;
            font-size: 26px;
            font-weight: bold;
            line-height: 1.4;
            color: var(--text-color);
        }
        .article-date {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 30px;
            display: block;
        }

        h2 {
            margin-top: 50px;
            margin-bottom: 20px;
            font-size: 22px;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid var(--border-color);
            padding-left: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        p { margin-bottom: 1.5em; font-size: 16px; }

        /* Code Block (Pre) */
        pre {
            background-color: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 6px;
            overflow-x: auto;
            font-family: "Consolas", "Monaco", "Courier New", monospace;
            font-size: 14px;
            line-height: 1.6;
            margin: 20px 0;
            border: 1px solid var(--border-color);
        }
        [data-theme="light"] pre {
            background-color: #2d2d2d; /* Keep code dark for contrast */
        }
        
        /* CTA Box */
        .cta-box {
            background-color: rgba(0, 86, 179, 0.08);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            margin: 40px 0;
        }
        .cta-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px 35px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 16px;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
        .cta-btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
            color: #fff;
        }

        /* Footer */
        footer { background-color: var(--tool-bg); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; font-size: 14px; }
        .footer-content { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
        .footer-links { display: flex; gap: 20px; font-size: 12px; } 
        .footer-links a { color: var(--text-muted); }
        .copyright { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

        /* Back to top */
        #back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
            background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%;
            cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
            z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        #back-to-top.show { opacity: 1; visibility: visible; }

        /* Mobile */
        @media (max-width: 1200px) {
            .side-menu { display: none; } /* Hide TOC on mobile/tablet */
        }

        @media (max-width: 600px) {
            .container { padding: 25px; margin: 20px auto; }
            .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel-bg); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
            .nav-links.active { display: flex; }
            .hamburger { display: flex; }
            .footer-content { flex-direction: column; text-align: center; }
            .footer-links { justify-content: center; }
            .breadcrumb-nav { padding: 0 20px; }
            h1.article-title { font-size: 22px; }
        }

/* guide article: hex-conversion-guide */
/* --- CSS Variables (共通設定) --- */
        :root {
            --primary-color: #0056b3;
            --bg-color: #f4f7f9;
            --panel-bg: #ffffff;
            --input-bg: #ffffff;
            --tool-bg: #eef2f5;
            --text-color: #333333;
            --text-muted: #666666;
            --border-color: #dddddd;
            --error-color: #dc3545;
            --success-color: #28a745;
            --warning-bg: rgba(255, 193, 7, 0.15);
            --warning-border: rgba(255, 193, 7, 0.5);
            --warning-text: #856404;
            --hover-bg: #f0f0f0;
            --shadow: 0 2px 8px rgba(0,0,0,0.08);
            --header-height: 60px;
        }

        [data-theme="dark"] {
            --primary-color: #4da3ff;
            --bg-color: #121212;
            --panel-bg: #1e1e1e;
            --input-bg: #2d2d2d;
            --tool-bg: #252525;
            --text-color: #e0e0e0;
            --text-muted: #a0a0a0;
            --border-color: #444444;
            --error-color: #ff6b6b;
            --success-color: #4cd964;
            --warning-bg: rgba(255, 193, 7, 0.1);
            --warning-border: rgba(255, 193, 7, 0.3);
            --warning-text: #ffda6a;
            --hover-bg: #333333;
            --shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        body {
            font-family: "Helvetica Neue", Arial, sans-serif;
            line-height: 1.8;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0; padding: 0;
            transition: background-color 0.3s, color 0.3s;
        }

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

        /* Header */
        header {
            background-color: var(--panel-bg);
            border-bottom: 1px solid var(--border-color);
            height: var(--header-height);
            position: sticky; top: 0; z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .nav-container {
            max-width: 1000px; margin: 0 auto; padding: 0 20px;
            height: 100%; display: flex; justify-content: space-between; align-items: center;
        }
        .logo { font-size: 20px; margin: 0; font-weight: bold; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
        .logo a:hover { text-decoration: none; }

        .nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 20px; }
        .nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .nav-links a:hover { color: var(--primary-color); text-decoration: none; }
        
        .header-actions { display: flex; align-items: center; gap: 10px; }
        #theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 20px; width: 40px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-color); }
        
        /* Hamburger */
        .hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; }
        .hamburger span { width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; }

        /* Breadcrumbs */
        .breadcrumb-nav {
            max-width: 800px;
            margin: 20px auto 0;
            padding: 0 10px;
            font-size: 14px;
            color: var(--text-muted);
        }
        .breadcrumb-nav ol {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .breadcrumb-nav li { display: flex; align-items: center; }
        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin-left: 8px;
            color: var(--border-color);
        }
        .breadcrumb-nav a { color: var(--text-muted); }
        .breadcrumb-nav a:hover { color: var(--primary-color); }
        .breadcrumb-nav span { color: var(--text-color); font-weight: bold; }

        /* Side Floating Menu (Table of Contents) */
        .side-menu {
            position: fixed;
            left: max(20px, calc(50% - 650px));
            top: 165px; 
            width: 200px;
            background-color: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 90;
            overflow: hidden;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }
        .toc-title {
            font-size: 14px;
            font-weight: bold;
            padding: 12px 20px;
            margin: 0;
            background-color: var(--tool-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-muted);
        }
        .side-menu ul { list-style: none; padding: 0; margin: 0; }
        .side-menu li { border-bottom: 1px solid var(--border-color); }
        .side-menu li:last-child { border-bottom: none; }
        .side-menu a {
            display: block; padding: 10px 20px; color: var(--text-color); font-size: 13px; transition: all 0.2s;
            text-decoration: none;
        }
        .side-menu a:hover { background-color: var(--hover-bg); color: var(--primary-color); }
        
        /* Highlight Current Section in TOC */
        .side-menu a.current {
            background-color: rgba(0, 86, 179, 0.08); 
            color: var(--primary-color); 
            font-weight: bold; 
            border-left: 4px solid var(--primary-color); 
            padding-left: 16px;
        }
        [data-theme="dark"] .side-menu a.current { background-color: rgba(77, 163, 255, 0.1); }

        /* Main Content */
        .container {
            max-width: 800px; margin: 20px auto 40px;
            background: var(--panel-bg);
            padding: 40px; border-radius: 8px; box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* Article specific styles */
        h1.article-title {
            margin: 0 0 10px 0;
            font-size: 26px;
            font-weight: bold;
            line-height: 1.4;
            color: var(--text-color);
        }
        .article-date {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 30px;
            display: block;
        }

        h2 {
            margin-top: 50px;
            margin-bottom: 20px;
            font-size: 22px;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid var(--border-color);
            padding-left: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        p { margin-bottom: 1.5em; font-size: 16px; }

        /* Code Block (Pre) */
        pre {
            background-color: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 6px;
            overflow-x: auto;
            font-family: "Consolas", "Monaco", "Courier New", monospace;
            font-size: 14px;
            line-height: 1.6;
            margin: 20px 0;
            border: 1px solid var(--border-color);
        }
        [data-theme="light"] pre {
            background-color: #2d2d2d; /* Keep code dark for contrast */
        }
        
        /* CTA Box */
        .cta-box {
            background-color: rgba(0, 86, 179, 0.08);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            margin: 40px 0;
        }
        .cta-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px 35px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 16px;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
        .cta-btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
            color: #fff;
        }

        /* Footer */
        footer { background-color: var(--tool-bg); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; font-size: 14px; }
        .footer-content { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
        .footer-links { display: flex; gap: 20px; font-size: 12px; } 
        .footer-links a { color: var(--text-muted); }
        .copyright { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

        /* Back to top */
        #back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
            background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%;
            cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
            z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        #back-to-top.show { opacity: 1; visibility: visible; }

        /* Mobile */
        @media (max-width: 1200px) {
            .side-menu { display: none; } /* Hide TOC on mobile/tablet */
        }

        @media (max-width: 600px) {
            .container { padding: 25px; margin: 20px auto; }
            .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel-bg); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
            .nav-links.active { display: flex; }
            .hamburger { display: flex; }
            .footer-content { flex-direction: column; text-align: center; }
            .footer-links { justify-content: center; }
            .breadcrumb-nav { padding: 0 20px; }
            h1.article-title { font-size: 22px; }
        }

/* guide article: hex-to-bin-conversion */
/* --- CSS Variables (共通設定) --- */
        :root {
            --primary-color: #0056b3;
            --bg-color: #f4f7f9;
            --panel-bg: #ffffff;
            --input-bg: #ffffff;
            --tool-bg: #eef2f5;
            --text-color: #333333;
            --text-muted: #666666;
            --border-color: #dddddd;
            --error-color: #dc3545;
            --success-color: #28a745;
            --warning-bg: rgba(255, 193, 7, 0.15);
            --warning-border: rgba(255, 193, 7, 0.5);
            --warning-text: #856404;
            --hover-bg: #f0f0f0;
            --shadow: 0 2px 8px rgba(0,0,0,0.08);
            --header-height: 60px;
        }

        [data-theme="dark"] {
            --primary-color: #4da3ff;
            --bg-color: #121212;
            --panel-bg: #1e1e1e;
            --input-bg: #2d2d2d;
            --tool-bg: #252525;
            --text-color: #e0e0e0;
            --text-muted: #a0a0a0;
            --border-color: #444444;
            --error-color: #ff6b6b;
            --success-color: #4cd964;
            --warning-bg: rgba(255, 193, 7, 0.1);
            --warning-border: rgba(255, 193, 7, 0.3);
            --warning-text: #ffda6a;
            --hover-bg: #333333;
            --shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        body {
            font-family: "Helvetica Neue", Arial, sans-serif;
            line-height: 1.8;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0; padding: 0;
            transition: background-color 0.3s, color 0.3s;
        }

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

        /* Header */
        header {
            background-color: var(--panel-bg);
            border-bottom: 1px solid var(--border-color);
            height: var(--header-height);
            position: sticky; top: 0; z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .nav-container {
            max-width: 1000px; margin: 0 auto; padding: 0 20px;
            height: 100%; display: flex; justify-content: space-between; align-items: center;
        }
        .logo { font-size: 20px; margin: 0; font-weight: bold; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
        .logo a:hover { text-decoration: none; }

        .nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 20px; }
        .nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .nav-links a:hover { color: var(--primary-color); text-decoration: none; }
        
        .header-actions { display: flex; align-items: center; gap: 10px; }
        #theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 20px; width: 40px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-color); }
        
        /* Hamburger */
        .hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; }
        .hamburger span { width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; }

        /* Breadcrumbs */
        .breadcrumb-nav {
            max-width: 800px;
            margin: 20px auto 0;
            padding: 0 10px;
            font-size: 14px;
            color: var(--text-muted);
        }
        .breadcrumb-nav ol {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .breadcrumb-nav li { display: flex; align-items: center; }
        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin-left: 8px;
            color: var(--border-color);
        }
        .breadcrumb-nav a { color: var(--text-muted); }
        .breadcrumb-nav a:hover { color: var(--primary-color); }
        .breadcrumb-nav span { color: var(--text-color); font-weight: bold; }

        /* Side Floating Menu (Table of Contents) */
        .side-menu {
            position: fixed;
            left: max(20px, calc(50% - 650px));
            top: 165px; 
            width: 200px;
            background-color: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 90;
            overflow: hidden;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }
        .toc-title {
            font-size: 14px;
            font-weight: bold;
            padding: 12px 20px;
            margin: 0;
            background-color: var(--tool-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-muted);
        }
        .side-menu ul { list-style: none; padding: 0; margin: 0; }
        .side-menu li { border-bottom: 1px solid var(--border-color); }
        .side-menu li:last-child { border-bottom: none; }
        .side-menu a {
            display: block; padding: 10px 20px; color: var(--text-color); font-size: 13px; transition: all 0.2s;
            text-decoration: none;
        }
        .side-menu a:hover { background-color: var(--hover-bg); color: var(--primary-color); }
        
        /* Highlight Current Section in TOC */
        .side-menu a.current {
            background-color: rgba(0, 86, 179, 0.08); 
            color: var(--primary-color); 
            font-weight: bold; 
            border-left: 4px solid var(--primary-color); 
            padding-left: 16px;
        }
        [data-theme="dark"] .side-menu a.current { background-color: rgba(77, 163, 255, 0.1); }

        /* Main Content */
        .container {
            max-width: 800px; margin: 20px auto 40px;
            background: var(--panel-bg);
            padding: 40px; border-radius: 8px; box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* Article specific styles */
        h1.article-title {
            margin: 0 0 10px 0;
            font-size: 26px;
            font-weight: bold;
            line-height: 1.4;
            color: var(--text-color);
        }
        .article-date {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 30px;
            display: block;
        }

        h2 {
            margin-top: 50px;
            margin-bottom: 20px;
            font-size: 22px;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid var(--border-color);
            padding-left: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        p { margin-bottom: 1.5em; font-size: 16px; }

        /* Code Block (Pre) */
        pre {
            background-color: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 6px;
            overflow-x: auto;
            font-family: "Consolas", "Monaco", "Courier New", monospace;
            font-size: 14px;
            line-height: 1.6;
            margin: 20px 0;
            border: 1px solid var(--border-color);
        }
        [data-theme="light"] pre {
            background-color: #2d2d2d; /* Keep code dark for contrast */
        }
        
        /* CTA Box */
        .cta-box {
            background-color: rgba(0, 86, 179, 0.08);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            margin: 40px 0;
        }
        .cta-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px 35px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 16px;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
        .cta-btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
            color: #fff;
        }

        /* Footer */
        footer { background-color: var(--tool-bg); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; font-size: 14px; }
        .footer-content { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
        .footer-links { display: flex; gap: 20px; font-size: 12px; } 
        .footer-links a { color: var(--text-muted); }
        .copyright { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

        /* Back to top */
        #back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
            background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%;
            cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
            z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        #back-to-top.show { opacity: 1; visibility: visible; }

        /* Mobile */
        @media (max-width: 1200px) {
            .side-menu { display: none; } /* Hide TOC on mobile/tablet */
        }

        @media (max-width: 600px) {
            .container { padding: 25px; margin: 20px auto; }
            .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel-bg); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
            .nav-links.active { display: flex; }
            .hamburger { display: flex; }
            .footer-content { flex-direction: column; text-align: center; }
            .footer-links { justify-content: center; }
            .breadcrumb-nav { padding: 0 20px; }
            h1.article-title { font-size: 22px; }
        }

/* guide article: hex-to-binary-mechanism */
/* --- CSS Variables (共通設定) --- */
        :root {
            --primary-color: #0056b3;
            --bg-color: #f4f7f9;
            --panel-bg: #ffffff;
            --input-bg: #ffffff;
            --tool-bg: #eef2f5;
            --text-color: #333333;
            --text-muted: #666666;
            --border-color: #dddddd;
            --error-color: #dc3545;
            --success-color: #28a745;
            --warning-bg: rgba(255, 193, 7, 0.15);
            --warning-border: rgba(255, 193, 7, 0.5);
            --warning-text: #856404;
            --hover-bg: #f0f0f0;
            --shadow: 0 2px 8px rgba(0,0,0,0.08);
            --header-height: 60px;
        }

        [data-theme="dark"] {
            --primary-color: #4da3ff;
            --bg-color: #121212;
            --panel-bg: #1e1e1e;
            --input-bg: #2d2d2d;
            --tool-bg: #252525;
            --text-color: #e0e0e0;
            --text-muted: #a0a0a0;
            --border-color: #444444;
            --error-color: #ff6b6b;
            --success-color: #4cd964;
            --warning-bg: rgba(255, 193, 7, 0.1);
            --warning-border: rgba(255, 193, 7, 0.3);
            --warning-text: #ffda6a;
            --hover-bg: #333333;
            --shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        body {
            font-family: "Helvetica Neue", Arial, sans-serif;
            line-height: 1.8;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0; padding: 0;
            transition: background-color 0.3s, color 0.3s;
        }

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

        /* Header */
        header {
            background-color: var(--panel-bg);
            border-bottom: 1px solid var(--border-color);
            height: var(--header-height);
            position: sticky; top: 0; z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .nav-container {
            max-width: 1000px; margin: 0 auto; padding: 0 20px;
            height: 100%; display: flex; justify-content: space-between; align-items: center;
        }
        .logo { font-size: 20px; margin: 0; font-weight: bold; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
        .logo a:hover { text-decoration: none; }

        .nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 20px; }
        .nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .nav-links a:hover { color: var(--primary-color); text-decoration: none; }
        
        .header-actions { display: flex; align-items: center; gap: 10px; }
        #theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 20px; width: 40px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-color); }
        
        /* Hamburger */
        .hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; }
        .hamburger span { width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; }

        /* Breadcrumbs */
        .breadcrumb-nav {
            max-width: 800px;
            margin: 20px auto 0;
            padding: 0 10px;
            font-size: 14px;
            color: var(--text-muted);
        }
        .breadcrumb-nav ol {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .breadcrumb-nav li { display: flex; align-items: center; }
        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin-left: 8px;
            color: var(--border-color);
        }
        .breadcrumb-nav a { color: var(--text-muted); }
        .breadcrumb-nav a:hover { color: var(--primary-color); }
        .breadcrumb-nav span { color: var(--text-color); font-weight: bold; }

        /* Side Floating Menu (Table of Contents) */
        .side-menu {
            position: fixed;
            left: max(20px, calc(50% - 650px));
            top: 165px; 
            width: 200px;
            background-color: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 90;
            overflow: hidden;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }
        .toc-title {
            font-size: 14px;
            font-weight: bold;
            padding: 12px 20px;
            margin: 0;
            background-color: var(--tool-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-muted);
        }
        .side-menu ul { list-style: none; padding: 0; margin: 0; }
        .side-menu li { border-bottom: 1px solid var(--border-color); }
        .side-menu li:last-child { border-bottom: none; }
        .side-menu a {
            display: block; padding: 10px 20px; color: var(--text-color); font-size: 13px; transition: all 0.2s;
            text-decoration: none;
        }
        .side-menu a:hover { background-color: var(--hover-bg); color: var(--primary-color); }
        
        /* Highlight Current Section in TOC */
        .side-menu a.current {
            background-color: rgba(0, 86, 179, 0.08); 
            color: var(--primary-color); 
            font-weight: bold; 
            border-left: 4px solid var(--primary-color); 
            padding-left: 16px;
        }
        [data-theme="dark"] .side-menu a.current { background-color: rgba(77, 163, 255, 0.1); }

        /* Main Content */
        .container {
            max-width: 800px; margin: 20px auto 40px;
            background: var(--panel-bg);
            padding: 40px; border-radius: 8px; box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* Article specific styles */
        h1.article-title {
            margin: 0 0 10px 0;
            font-size: 26px;
            font-weight: bold;
            line-height: 1.4;
            color: var(--text-color);
        }
        .article-date {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 30px;
            display: block;
        }

        h2 {
            margin-top: 50px;
            margin-bottom: 20px;
            font-size: 22px;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid var(--border-color);
            padding-left: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        p { margin-bottom: 1.5em; font-size: 16px; }

        /* Table Styles */
        .conversion-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            font-size: 15px;
        }
        .conversion-table th, .conversion-table td {
            border: 1px solid var(--border-color);
            padding: 12px;
            text-align: center;
        }
        .conversion-table th {
            background-color: var(--tool-bg);
            color: var(--text-muted);
            font-weight: bold;
            width: 50%;
        }
        .conversion-table tr:nth-child(even) {
            background-color: rgba(0,0,0,0.02);
        }

        /* Example Box */
        .example-box {
            background-color: var(--tool-bg);
            border-left: 4px solid var(--primary-color);
            padding: 20px;
            margin: 20px 0;
            border-radius: 0 6px 6px 0;
        }
        .step-visual {
            display: flex;
            align-items: center;
            gap: 15px;
            flex-wrap: wrap;
            font-family: monospace;
            font-size: 18px;
            margin-top: 10px;
        }
        .arrow { color: var(--text-muted); }

        /* Code Block (Pre) */
        pre {
            background-color: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 6px;
            overflow-x: auto;
            font-family: "Consolas", "Monaco", "Courier New", monospace;
            font-size: 14px;
            line-height: 1.6;
            margin: 20px 0;
            border: 1px solid var(--border-color);
        }
        [data-theme="light"] pre {
            background-color: #2d2d2d;
        }

        /* CTA Box */
        .cta-box {
            background-color: rgba(0, 86, 179, 0.08);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            margin: 40px 0;
        }
        .cta-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px 35px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 16px;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
        .cta-btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
            color: #fff;
        }

        /* Footer */
        footer { background-color: var(--tool-bg); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; font-size: 14px; }
        .footer-content { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
        .footer-links { display: flex; gap: 20px; font-size: 12px; } 
        .footer-links a { color: var(--text-muted); }
        .copyright { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

        /* Back to top */
        #back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
            background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%;
            cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
            z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        #back-to-top.show { opacity: 1; visibility: visible; }

        /* Mobile */
        @media (max-width: 1200px) {
            .side-menu { display: none; } /* Hide TOC on mobile/tablet */
        }

        @media (max-width: 600px) {
            .container { padding: 25px; margin: 20px auto; }
            .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel-bg); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
            .nav-links.active { display: flex; }
            .hamburger { display: flex; }
            .footer-content { flex-direction: column; text-align: center; }
            .footer-links { justify-content: center; }
            .breadcrumb-nav { padding: 0 20px; }
            h1.article-title { font-size: 22px; }
        }

/* guide article: hex-to-dec-method */
/* --- CSS Variables (共通設定) --- */
        :root {
            --primary-color: #0056b3;
            --bg-color: #f4f7f9;
            --panel-bg: #ffffff;
            --input-bg: #ffffff;
            --tool-bg: #eef2f5;
            --text-color: #333333;
            --text-muted: #666666;
            --border-color: #dddddd;
            --error-color: #dc3545;
            --success-color: #28a745;
            --warning-bg: rgba(255, 193, 7, 0.15);
            --warning-border: rgba(255, 193, 7, 0.5);
            --warning-text: #856404;
            --hover-bg: #f0f0f0;
            --shadow: 0 2px 8px rgba(0,0,0,0.08);
            --header-height: 60px;
        }

        [data-theme="dark"] {
            --primary-color: #4da3ff;
            --bg-color: #121212;
            --panel-bg: #1e1e1e;
            --input-bg: #2d2d2d;
            --tool-bg: #252525;
            --text-color: #e0e0e0;
            --text-muted: #a0a0a0;
            --border-color: #444444;
            --error-color: #ff6b6b;
            --success-color: #4cd964;
            --warning-bg: rgba(255, 193, 7, 0.1);
            --warning-border: rgba(255, 193, 7, 0.3);
            --warning-text: #ffda6a;
            --hover-bg: #333333;
            --shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        body {
            font-family: "Helvetica Neue", Arial, sans-serif;
            line-height: 1.8;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0; padding: 0;
            transition: background-color 0.3s, color 0.3s;
        }

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

        /* Header */
        header {
            background-color: var(--panel-bg);
            border-bottom: 1px solid var(--border-color);
            height: var(--header-height);
            position: sticky; top: 0; z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .nav-container {
            max-width: 1000px; margin: 0 auto; padding: 0 20px;
            height: 100%; display: flex; justify-content: space-between; align-items: center;
        }
        .logo { font-size: 20px; margin: 0; font-weight: bold; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
        
        .nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 20px; }
        .nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .nav-links a:hover { color: var(--primary-color); text-decoration: none; }
        
        .header-actions { display: flex; align-items: center; gap: 10px; }
        #theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 20px; width: 40px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-color); }
        
        /* Hamburger */
        .hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; }
        .hamburger span { width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; }

        /* Breadcrumbs */
        .breadcrumb-nav {
            max-width: 800px;
            margin: 20px auto 0;
            padding: 0 10px;
            font-size: 14px;
            color: var(--text-muted);
        }
        .breadcrumb-nav ol {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .breadcrumb-nav li { display: flex; align-items: center; }
        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin-left: 8px;
            color: var(--border-color);
        }
        .breadcrumb-nav a { color: var(--text-muted); }
        .breadcrumb-nav a:hover { color: var(--primary-color); }
        .breadcrumb-nav span { color: var(--text-color); font-weight: bold; }

        /* Side Floating Menu (Table of Contents) */
        .side-menu {
            position: fixed;
            left: max(20px, calc(50% - 650px));
            top: 165px; 
            width: 200px;
            background-color: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 90;
            overflow: hidden;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }
        .toc-title {
            font-size: 14px;
            font-weight: bold;
            padding: 12px 20px;
            margin: 0;
            background-color: var(--tool-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-muted);
        }
        .side-menu ul { list-style: none; padding: 0; margin: 0; }
        .side-menu li { border-bottom: 1px solid var(--border-color); }
        .side-menu li:last-child { border-bottom: none; }
        .side-menu a {
            display: block; padding: 10px 20px; color: var(--text-color); font-size: 13px; transition: all 0.2s;
            text-decoration: none;
        }
        .side-menu a:hover { background-color: var(--hover-bg); color: var(--primary-color); }
        
        /* Highlight Current Section in TOC */
        .side-menu a.current {
            background-color: rgba(0, 86, 179, 0.08); 
            color: var(--primary-color); 
            font-weight: bold; 
            border-left: 4px solid var(--primary-color); 
            padding-left: 16px;
        }
        [data-theme="dark"] .side-menu a.current { background-color: rgba(77, 163, 255, 0.1); }

        /* Main Content */
        .container {
            max-width: 800px; margin: 20px auto 40px;
            background: var(--panel-bg);
            padding: 40px; border-radius: 8px; box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* Article specific styles */
        h1.article-title {
            margin: 0 0 10px 0;
            font-size: 26px;
            font-weight: bold;
            line-height: 1.4;
            color: var(--text-color);
        }
        .article-date {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 30px;
            display: block;
        }

        h2 {
            margin-top: 50px;
            margin-bottom: 20px;
            font-size: 22px;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 10px;
            color: var(--text-color);
            /* ★修正箇所: ヘッダーの高さ分+αの余白を確保してスクロール位置を調整 */
            scroll-margin-top: 80px; 
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid var(--border-color);
            padding-left: 10px;
            color: var(--text-color);
            /* ★修正箇所: h3にも同じ調整を適用 */
            scroll-margin-top: 80px;
        }
        p { margin-bottom: 1.5em; font-size: 16px; }

        /* Code Block (Pre) */
        pre {
            background-color: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 6px;
            overflow-x: auto;
            font-family: "Consolas", "Monaco", "Courier New", monospace;
            font-size: 14px;
            line-height: 1.6;
            margin: 20px 0;
            border: 1px solid var(--border-color);
        }
        [data-theme="light"] pre {
            background-color: #2d2d2d; /* Keep code dark for contrast */
        }
        
        /* CTA Box */
        .cta-box {
            background-color: rgba(0, 86, 179, 0.08);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            margin: 40px 0;
        }
        .cta-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px 35px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 16px;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
        .cta-btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
            color: #fff;
        }

        /* Footer */
        footer { background-color: var(--tool-bg); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; font-size: 14px; }
        .footer-content { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
        .footer-links { display: flex; gap: 20px; font-size: 12px; } 
        .footer-links a { color: var(--text-muted); }
        .copyright { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

        /* Back to top */
        #back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
            background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%;
            cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
            z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        #back-to-top.show { opacity: 1; visibility: visible; }

        /* Mobile */
        @media (max-width: 1200px) {
            .side-menu { display: none; } /* Hide TOC on mobile/tablet */
        }

        @media (max-width: 600px) {
            .container { padding: 25px; margin: 20px auto; }
            .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel-bg); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
            .nav-links.active { display: flex; }
            .hamburger { display: flex; }
            .footer-content { flex-direction: column; text-align: center; }
            .footer-links { justify-content: center; }
            .breadcrumb-nav { padding: 0 20px; }
            h1.article-title { font-size: 22px; }
        }

/* guide article: oct-to-hex-conversion */
/* --- CSS Variables (共通設定) --- */
        :root {
            --primary-color: #0056b3;
            --bg-color: #f4f7f9;
            --panel-bg: #ffffff;
            --input-bg: #ffffff;
            --tool-bg: #eef2f5;
            --text-color: #333333;
            --text-muted: #666666;
            --border-color: #dddddd;
            --error-color: #dc3545;
            --success-color: #28a745;
            --warning-bg: rgba(255, 193, 7, 0.15);
            --warning-border: rgba(255, 193, 7, 0.5);
            --warning-text: #856404;
            --hover-bg: #f0f0f0;
            --shadow: 0 2px 8px rgba(0,0,0,0.08);
            --header-height: 60px;
        }

        [data-theme="dark"] {
            --primary-color: #4da3ff;
            --bg-color: #121212;
            --panel-bg: #1e1e1e;
            --input-bg: #2d2d2d;
            --tool-bg: #252525;
            --text-color: #e0e0e0;
            --text-muted: #a0a0a0;
            --border-color: #444444;
            --error-color: #ff6b6b;
            --success-color: #4cd964;
            --warning-bg: rgba(255, 193, 7, 0.1);
            --warning-border: rgba(255, 193, 7, 0.3);
            --warning-text: #ffda6a;
            --hover-bg: #333333;
            --shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        body {
            font-family: "Helvetica Neue", Arial, sans-serif;
            line-height: 1.8;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0; padding: 0;
            transition: background-color 0.3s, color 0.3s;
        }

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

        /* Header */
        header {
            background-color: var(--panel-bg);
            border-bottom: 1px solid var(--border-color);
            height: var(--header-height);
            position: sticky; top: 0; z-index: 100;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .nav-container {
            max-width: 1000px; margin: 0 auto; padding: 0 20px;
            height: 100%; display: flex; justify-content: space-between; align-items: center;
        }
        .logo { font-size: 20px; margin: 0; font-weight: bold; color: var(--text-color); display: flex; align-items: center; gap: 10px; }
        .logo a:hover { text-decoration: none; }

        .nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto; margin-right: 20px; }
        .nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
        .nav-links a:hover { color: var(--primary-color); text-decoration: none; }
        
        .header-actions { display: flex; align-items: center; gap: 10px; }
        #theme-toggle { background: none; border: 1px solid var(--border-color); border-radius: 20px; width: 40px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-color); }
        
        /* Hamburger */
        .hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; }
        .hamburger span { width: 100%; height: 3px; background-color: var(--text-color); border-radius: 3px; }

        /* Breadcrumbs */
        .breadcrumb-nav {
            max-width: 800px;
            margin: 20px auto 0;
            padding: 0 10px;
            font-size: 14px;
            color: var(--text-muted);
        }
        .breadcrumb-nav ol {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .breadcrumb-nav li { display: flex; align-items: center; }
        .breadcrumb-nav li:not(:last-child)::after {
            content: "/";
            margin-left: 8px;
            color: var(--border-color);
        }
        .breadcrumb-nav a { color: var(--text-muted); }
        .breadcrumb-nav a:hover { color: var(--primary-color); }
        .breadcrumb-nav span { color: var(--text-color); font-weight: bold; }

        /* Side Floating Menu (Table of Contents) */
        .side-menu {
            position: fixed;
            left: max(20px, calc(50% - 650px));
            top: 165px; 
            width: 200px;
            background-color: var(--panel-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 90;
            overflow: hidden;
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }
        .toc-title {
            font-size: 14px;
            font-weight: bold;
            padding: 12px 20px;
            margin: 0;
            background-color: var(--tool-bg);
            border-bottom: 1px solid var(--border-color);
            color: var(--text-muted);
        }
        .side-menu ul { list-style: none; padding: 0; margin: 0; }
        .side-menu li { border-bottom: 1px solid var(--border-color); }
        .side-menu li:last-child { border-bottom: none; }
        .side-menu a {
            display: block; padding: 10px 20px; color: var(--text-color); font-size: 13px; transition: all 0.2s;
            text-decoration: none;
        }
        .side-menu a:hover { background-color: var(--hover-bg); color: var(--primary-color); }
        
        /* Highlight Current Section in TOC */
        .side-menu a.current {
            background-color: rgba(0, 86, 179, 0.08); 
            color: var(--primary-color); 
            font-weight: bold; 
            border-left: 4px solid var(--primary-color); 
            padding-left: 16px;
        }
        [data-theme="dark"] .side-menu a.current { background-color: rgba(77, 163, 255, 0.1); }

        /* Main Content */
        .container {
            max-width: 800px; margin: 20px auto 40px;
            background: var(--panel-bg);
            padding: 40px; border-radius: 8px; box-shadow: var(--shadow);
            border: 1px solid var(--border-color);
            position: relative;
        }

        /* Article specific styles */
        h1.article-title {
            margin: 0 0 10px 0;
            font-size: 26px;
            font-weight: bold;
            line-height: 1.4;
            color: var(--text-color);
        }
        .article-date {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 30px;
            display: block;
        }

        h2 {
            margin-top: 50px;
            margin-bottom: 20px;
            font-size: 22px;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        h3 {
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
            border-left: 4px solid var(--border-color);
            padding-left: 10px;
            color: var(--text-color);
            scroll-margin-top: 80px;
        }
        p { margin-bottom: 1.5em; font-size: 16px; }

        /* Code Block (Pre) */
        pre {
            background-color: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 6px;
            overflow-x: auto;
            font-family: "Consolas", "Monaco", "Courier New", monospace;
            font-size: 14px;
            line-height: 1.6;
            margin: 20px 0;
            border: 1px solid var(--border-color);
        }
        [data-theme="light"] pre {
            background-color: #2d2d2d; /* Keep code dark for contrast */
        }
        
        /* CTA Box */
        .cta-box {
            background-color: rgba(0, 86, 179, 0.08);
            border: 2px solid var(--primary-color);
            border-radius: 8px;
            padding: 25px;
            text-align: center;
            margin: 40px 0;
        }
        .cta-btn {
            display: inline-block;
            background-color: var(--primary-color);
            color: #fff;
            padding: 12px 35px;
            border-radius: 50px;
            font-weight: bold;
            font-size: 16px;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            transition: transform 0.2s;
        }
        .cta-btn:hover {
            transform: translateY(-2px);
            text-decoration: none;
            color: #fff;
        }

        /* Footer */
        footer { background-color: var(--tool-bg); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 60px; font-size: 14px; }
        .footer-content { max-width: 1000px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
        .footer-links { display: flex; gap: 20px; font-size: 12px; } 
        .footer-links a { color: var(--text-muted); }
        .copyright { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 12px; }

        /* Back to top */
        #back-to-top {
            position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
            background-color: var(--primary-color); color: #fff; border: none; border-radius: 50%;
            cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
            z-index: 1000; display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        #back-to-top.show { opacity: 1; visibility: visible; }

        /* Mobile */
        @media (max-width: 1200px) {
            .side-menu { display: none; } /* Hide TOC on mobile/tablet */
        }

        @media (max-width: 600px) {
            .container { padding: 25px; margin: 20px auto; }
            .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel-bg); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
            .nav-links.active { display: flex; }
            .hamburger { display: flex; }
            .footer-content { flex-direction: column; text-align: center; }
            .footer-links { justify-content: center; }
            .breadcrumb-nav { padding: 0 20px; }
            h1.article-title { font-size: 22px; }
        }
