:root {
    --primary: #003a76;
    --primary-light: #e6ecf2;
    --secondary: #f4f7f9;
    --up: #d9534f;
    --down: #0275d8;
    --risk: #fff8e1;
    --risk-border: #ffb300;
    --biz: #e8f5e9;
    --biz-border: #2e7d32;
    --text: #2d3436;
    --text-muted: #636e72;
    --header-height: 70px;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body { 
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif; 
    line-height: 1.8; 
    color: var(--text); 
    margin: 0; 
    padding-top: var(--header-height); 
    background-color: #f0f2f5; 
}

/* Header */
header.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}
.header-logo {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}
.header-logo span {
    background: #fff;
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 0.8rem;
}
nav.header-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}
nav.header-nav ul li { margin-left: 20px; }
nav.header-nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: opacity 0.3s;
}
nav.header-nav ul li a:hover { opacity: 0.7; }

/* Meta & Breadcrumb & Weekly Nav */
.top-meta-container {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.breadcrumb {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.breadcrumb li + li::before {
    content: ">";
    padding: 0 8px;
    color: #ccc;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }

.weekly-nav-header {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
}
.weekly-nav-header a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 4px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    transition: all 0.2s;
}
.weekly-nav-header a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.source-badge {
    font-size: 0.75rem;
    background: var(--secondary);
    padding: 5px 15px;
    border-radius: 20px;
    color: var(--primary);
    text-decoration: none;
    border: 1px solid #d1d9e0;
    transition: all 0.2s;
}
.source-badge:hover { background: var(--primary); color: #fff; }

/* Main Layout */
.main-content {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.card { 
    background: #fff; 
    padding: 40px; 
    border-radius: 12px; 
    box-shadow: var(--card-shadow); 
    margin-bottom: 30px; 
    overflow: hidden;
}

.card[id] { scroll-margin-top: calc(var(--header-height) + 20px); }

.report-title { 
    text-align: center; 
    border-bottom: 2px solid var(--secondary); 
    padding-bottom: 30px; 
    margin-bottom: 40px; 
}
.report-title h1 { color: var(--primary); font-size: 1.8rem; margin: 0; line-height: 1.3; }
.report-title p { color: var(--text-muted); margin-top: 15px; font-size: 1rem; }

h2 { 
    color: var(--primary); 
    border-left: 6px solid var(--primary); 
    padding-left: 15px; 
    margin: 10px 0 25px; 
    font-size: 1.4rem; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
h3 { 
    font-size: 1.15rem; 
    color: #333; 
    margin-top: 30px; 
    border-bottom: 2px solid var(--secondary); 
    padding-bottom: 8px; 
}

/* Chart */
.chart-wrapper { 
    position: relative; 
    width: 100%; 
    margin: 30px 0; 
    background: #fff; 
    border: 1px solid #f0f0f0; 
    border-radius: 8px; 
    padding: 15px; 
}
.grid-line { stroke: #f0f0f0; stroke-width: 1; }
.trend-line { fill: none; stroke: var(--primary); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.data-point { fill: var(--primary); stroke: #fff; stroke-width: 2; }
.axis-label { font-size: 11px; fill: #94a3b8; }

/* News Grid */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.news-item { 
    border: 1px solid #edf2f7; 
    padding: 25px; 
    border-radius: 8px; 
    border-top: 4px solid var(--primary); 
    background: #fff; 
    transition: all 0.3s ease;
}
.news-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.date-badge { background: var(--primary-light); color: var(--primary); padding: 2px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; margin-bottom: 12px; display: inline-block; }

/* Info Boxes */
.info-box { padding: 25px; border-radius: 8px; margin: 25px 0; }
.cross-strait-box { background: var(--risk); border: 1px solid var(--risk-border); }
.biz-box { background: var(--biz); border: 1px solid var(--biz-border); }
.box-title { font-weight: bold; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.cross-strait-title { color: #856404; }
.biz-title { color: var(--biz-border); }

/* List Styling */
.outlook-list { list-style: none; padding: 0; }
.outlook-list li { margin-bottom: 25px; padding-left: 30px; position: relative; }
.outlook-list li::before { content: '●'; position: absolute; left: 0; color: var(--primary); font-size: 0.8rem; top: 4px; }

/* Table Responsive */
.table-container { overflow-x: auto; margin-top: 20px; border-radius: 8px; border: 1px solid #eee; }
table { width: 100%; border-collapse: collapse; min-width: 600px; font-size: 0.85rem; }
th, td { padding: 14px; text-align: left; border-bottom: 1px solid #eee; }
th { background: var(--secondary); color: var(--primary); font-weight: bold; white-space: nowrap; }
.val-up { color: var(--up); font-weight: bold; }

/* Prices */
.price-item-row { display: flex; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid #f0f0f0; align-items: center; }
.price-label-full { font-weight: 500; color: #444; font-size: 0.95rem; }
.price-values { text-align: right; }
.price-twd { font-size: 0.8rem; color: #94a3b8; margin-right: 8px; }
.price-jpy { font-size: 1.1rem; font-weight: bold; color: var(--up); }

.calc-example { background: #fff5f5; padding: 20px; border-left: 5px solid var(--up); margin-top: 30px; border-radius: 4px; }
.calc-example h4 { margin: 0 0 8px 0; color: var(--up); font-size: 1rem; }

/* Backnumber Section */
.backnumber-container { margin-top: 40px; padding: 30px; background: #fff; border-radius: 12px; box-shadow: var(--card-shadow); }
.backnumber-title { font-weight: bold; font-size: 1.1rem; color: var(--primary); margin-bottom: 20px; border-bottom: 2px solid var(--secondary); padding-bottom: 10px; }
.backnumber-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.backnumber-grid a {
    font-size: 0.85rem;
    color: var(--text);
    text-decoration: none;
    padding: 10px;
    background: var(--secondary);
    border-radius: 6px;
    transition: all 0.2s;
    text-align: center;
}
.backnumber-grid a:hover { background: var(--primary); color: #fff; }

/* Resources & Disclaimer */
.resources-list { list-style: none; padding: 0; font-size: 0.85rem; }
.resources-list li { margin-bottom: 10px; color: var(--text-muted); }
.resources-list a { color: var(--primary); text-decoration: none; border-bottom: 1px solid transparent; }
.resources-list a:hover { border-bottom: 1px solid var(--primary); }

.disclaimer-container { background-color: #f8fafc; border: 1px solid #e2e8f0; padding: 25px; font-size: 0.8rem; color: #64748b; line-height: 1.7; border-radius: 8px; margin-top: 30px; }
.disclaimer-title { font-weight: bold; margin-bottom: 12px; color: #475569; display: block; border-bottom: 1px solid #cbd5e1; padding-bottom: 5px; }

/* Ad Space */
.ad-container { margin: 40px auto; text-align: center; padding: 20px 0; border-top: 1px dashed #ccc; border-bottom: 1px dashed #ccc; }

/* Footer */
footer.site-footer { text-align: center; font-size: 0.75rem; color: #94a3b8; padding: 60px 0; background: #fff; border-top: 1px solid #e2e8f0; }

@media (max-width: 768px) {
    header.site-header { padding: 0 20px; }
    nav.header-nav { display: none; }
    .top-meta-container { flex-direction: column; align-items: stretch; gap: 15px; }
    .weekly-nav-header { justify-content: space-between; }
    .card { padding: 25px 20px; }
    .report-title h1 { font-size: 1.5rem; }
    .price-item-row { flex-direction: column; align-items: flex-start; }
    .price-values { margin-top: 5px; }
}