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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background: #fafafa;
}

/* Navigation */
nav {
    background: white;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-menu a {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: #059669;
}

/* Header */
.header {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    padding: 4rem 2rem 3rem;
    text-align: center;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.header .subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.header .description {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.05rem;
    opacity: 0.9;
    line-height: 1.7;
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Week Section */
section {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    text-align: center;
}

section h2 {
    font-size: 2rem;
    color: #059669;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #059669;
    display: block;
    width: fit-content;
    text-align: left;
}

.task-box {
    background: #f0fdf4;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid #059669;
    text-align: left;
}

.task-box strong {
    color: #059669;
}

.code-link-box {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #64748b;
    text-align: left;
}

.code-link-box a {
    color: #059669;
    text-decoration: none;
    font-weight: 600;
}

.code-link-box a:hover {
    text-decoration: underline;
}

.content-text {
    margin: 1.5rem 0;
    color: #475569;
    line-height: 1.7;
    text-align: left;
}

.content-text p {
    margin-bottom: 1rem;
    text-align: left;
}

/* Chart Styling */
figure {
    margin: 2rem auto;
    width: fit-content;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

figcaption {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: #64748b;
    font-style: italic;
    text-align: center;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem auto;
    display: block;
}

/* Chart Grids */
#chartGridx2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem auto;
    justify-items: center;
}

/* API Code Block */
.api-structure {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin: 1.5rem 0;
    color: #334155;
    line-height: 1.8;
    text-align: left;
}

/* Data Sources & Code Section */
section h3 {
    font-size: 1.5rem;
    color: #059669;
    margin: 2.5rem 0 1.5rem;
    text-align: left;
}

section ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

section ul li {
    margin-bottom: 0.8rem;
    line-height: 1.8;
    color: #475569;
}

section ul a {
    color: #059669;
    text-decoration: none;
    font-weight: 500;
}

section ul a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    margin-top: 4rem;
}

footer a {
    color: #059669;
    text-decoration: none;
}

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

/* Responsive adjustments */
@media (max-width: 968px) {
    #chartGridx2 {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 2.2rem;
    }

    section {
        padding: 2rem;
    }

    .nav-menu {
        gap: 1.5rem;
        font-size: 0.9rem;
    }
}