:root {
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --primary: #3b82f6;
    --secondary: #10b981;
    --danger: #ef4444;
    --accent: #f59e0b;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.8;
    padding: 0;
}

.nav-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-bar .logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.nav-bar .logo span {
    font-size: 0.9rem;
    font-weight: 400;
    color: #64748b;
    margin-left: 10px;
}

.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.main-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2rem;
}

.main-content {
    background: #fff;
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-box {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.sidebar-box h4 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 5px;
}

.sidebar-list {
    list-style: none;
    margin-left: 0;
}

.sidebar-list li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.sidebar-list a {
    color: #334155;
    text-decoration: none;
    transition: color 0.2s;
}

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

.back-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
}

/* Content styling */
h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.3; margin-bottom: 1.5rem; color: #0f172a; }
h2 { font-size: 1.7rem; font-weight: 700; color: #1e293b; margin: 3rem 0 1rem 0; border-left: 5px solid var(--primary); padding-left: 10px; }
h3 { font-size: 1.3rem; font-weight: 700; color: #334155; margin: 2rem 0 0.8rem 0; }
p { margin-bottom: 1.5rem; font-size: 1.05rem; }
ul, ol { margin-left: 2rem; margin-bottom: 1.5rem; }
li { margin-bottom: 0.5rem; font-size: 1.05rem; }

/* Tables */
.table-responsive { overflow-x: auto; margin: 2rem 0; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
th, td { padding: 1rem; border: 1px solid var(--border-color); text-align: left; vertical-align: top; }
th { background: #f1f5f9; font-weight: 700; }
.price-text { color: var(--danger); font-weight: 800; font-size: 1.2rem; }
.badge { background: #dbeafe; color: #1e40af; font-size: 0.8rem; padding: 4px 8px; border-radius: 4px; font-weight: bold; }
.table-features { list-style-type: none; margin-left: 0; }
.table-features li { font-size: 0.9rem; margin-bottom: 0.25rem; }
.table-cta-btn { display: inline-block; background: var(--primary); color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 4px; font-weight: bold; font-size: 0.9rem; text-align: center; }

/* CTA Card */
.cta-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #bfdbfe;
    border-radius: 16px;
    padding: 2rem;
    margin: 3rem 0;
    position: relative;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.1);
}
.cta-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
}
.cta-card h3 { margin-top: 0.5rem; color: #1e3a8a; font-size: 1.6rem; }
.cta-recommend { font-weight: bold; color: #1d4ed8; margin-bottom: 1rem; }
.cta-price { font-size: 1.1rem; margin-bottom: 1.5rem; }
.cta-price .price-val { font-weight: 800; font-size: 1.8rem; color: var(--danger); }
.cta-features-list { list-style: none; margin-left: 0; margin-bottom: 2rem; }
.cta-features-list li { margin-bottom: 0.5rem; font-weight: 600; color: #1e293b; }
.cta-button {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    padding: 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
    transition: transform 0.2s;
}
.article-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: block;
}

/* Sticky Sidebar & Sidebar CTA */
.sticky-sidebar {
    position: sticky;
    top: 5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.sidebar-cta {
    margin-top: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--primary);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.15);
}
.sidebar-cta-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.2s;
}
.sidebar-cta-img:hover {
    transform: scale(1.03);
}

/* Table of Contents (TOC) */
.toc-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2.5rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.toc-title {
    font-weight: 800;
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: #0f172a;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 5px;
    display: inline-block;
}
.toc-list {
    list-style-type: none;
    margin-left: 0;
}
.toc-list li {
    margin-bottom: 0.6rem;
    position: relative;
    padding-left: 1.5rem;
}
.toc-list li::before {
    content: "➔";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}
.toc-list a {
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.toc-list a:hover {
    color: var(--primary);
}

/* Category Hub (Home Portal) */
.category-hub {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}
.category-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}
.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}
.category-card h3 {
    margin-top: 0;
    font-size: 1.15rem;
    color: #1e3a8a;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
    margin-bottom: 1rem;
}
.category-card ul {
    list-style: none;
    margin-left: 0;
    margin-bottom: 0;
}
.category-card li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.4;
}
.category-card a {
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.category-card a:hover {
    color: var(--primary);
}

/* Footer */
footer { text-align: center; padding: 3rem 1.5rem; background: #0f172a; color: #94a3b8; font-size: 0.85rem; margin-top: 5rem; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .main-content {
        padding: 1.5rem;
    }
}
