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

:root {
    --primary: #e85d04;
    --primary-dark: #d00000;
    --secondary: #ffba08;
    --bg: #fefae0;
    --card-bg: #ffffff;
    --text: #283618;
    --text-light: #606c38;
    --border: #dda15e;
    --shadow: rgba(40, 54, 24, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Navigation */
.site-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.site-nav a:hover,
.site-nav a.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.6);
}

/* Content Card (shared by all sections) */
.content-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px var(--shadow);
    margin-bottom: 30px;
}

.content-card h2 {
    margin-bottom: 15px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-card h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 1.1rem;
}

.content-card p {
    margin-bottom: 15px;
    color: var(--text-light);
}

/* Chart Table */
.chart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.chart-table th,
.chart-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.chart-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.chart-table th:first-child {
    border-radius: 8px 0 0 0;
}

.chart-table th:last-child {
    border-radius: 0 8px 0 0;
}

.chart-table tr:hover {
    background: #f8f9fa;
}

.chart-table tr:last-child td:first-child {
    border-radius: 0 0 0 8px;
}

.chart-table tr:last-child td:last-child {
    border-radius: 0 0 8px 0;
}

/* Tips Box */
.tips-box {
    margin-top: 20px;
    padding: 15px 20px;
    background: #fff3cd;
    border-radius: 10px;
    border-left: 4px solid var(--secondary);
}

.tips-box h4 {
    color: #856404;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tips-box ul {
    margin-left: 20px;
    color: #856404;
}

.tips-box li {
    margin-bottom: 4px;
}

/* Print */
.print-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--text-light);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 15px;
    transition: background 0.2s;
}

.print-btn:hover {
    background: var(--text);
}

@media print {
    header, .print-btn, .tips-box, .site-nav {
        display: none !important;
    }
    .content-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}

/* Back to converter link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    transition: gap 0.2s;
}

.back-link:hover {
    gap: 10px;
}

/* Related Pages Grid */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.related-link {
    display: block;
    padding: 14px 16px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.related-link:hover {
    border-color: var(--primary);
    background: white;
    transform: translateY(-2px);
}

.related-link .icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 5px;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

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

footer a:hover {
    text-decoration: underline;
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.6rem;
    }
    .content-card {
        padding: 20px;
    }
    .chart-table th,
    .chart-table td {
        padding: 8px 6px;
        font-size: 0.85rem;
    }
}

/* Article Meta (dates, author) */
.article-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.article-meta time {
    font-weight: 500;
}
