:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #7c3aed;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.06);
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); text-decoration: none; }
.logo span { color: var(--secondary); }
nav a { margin-left: 24px; text-decoration: none; color: var(--text-light); font-weight: 500; transition: color .2s; }
nav a:hover { color: var(--primary); }

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 64px 0;
    color: #fff;
    text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 16px; font-weight: 800; }
.hero p { font-size: 1.15rem; opacity: .9; max-width: 640px; margin: 0 auto; }

.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 48px 0 40px;
    color: #fff;
}
.page-header h1 { font-size: 2rem; margin-bottom: 8px; font-weight: 800; }
.page-header p { opacity: .85; font-size: 1.05rem; }
.page-header .breadcrumbs { color: rgba(255,255,255,.7); padding: 0 0 16px; font-size: 14px; }
.page-header .breadcrumbs a { color: rgba(255,255,255,.9); text-decoration: none; }
.page-header .breadcrumbs a:hover { text-decoration: underline; }

.breadcrumbs { padding: 16px 0; font-size: 14px; color: var(--text-light); }
.breadcrumbs a { color: var(--primary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

section { margin: 48px 0; }
section h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: box-shadow .2s, transform .2s;
    display: block;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card .icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; color: var(--primary-dark); }
.card p { font-size: 14px; color: var(--text-light); line-height: 1.5; }

.class-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.class-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px 28px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    text-align: center;
    transition: box-shadow .2s, transform .2s;
}
.class-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.class-card .num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.class-card .label { font-size: 13px; color: var(--text-light); margin-top: 2px; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: background .2s, color .2s;
}
.tag:hover { background: var(--primary); color: #fff; }

.ext-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.ext-link {
    display: block;
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    border-left: 4px solid var(--primary);
    transition: box-shadow .2s, border-color .2s;
}
.ext-link:hover { box-shadow: var(--shadow-lg); border-left-color: var(--secondary); }
.ext-link .site-name { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.ext-link .site-desc { font-size: 13px; color: var(--text-light); line-height: 1.5; }

.lead { font-size: 1.05rem; color: var(--text-light); max-width: 800px; margin-bottom: 32px; line-height: 1.7; }

footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 40px 0;
    margin-top: 64px;
    text-align: center;
    font-size: 14px;
}
footer a { color: #cbd5e1; text-decoration: none; }
footer a:hover { color: #fff; }
footer p + p { margin-top: 8px; }

@media (max-width: 768px) {
    .hero h1 { font-size: 1.75rem; }
    .hero { padding: 40px 0; }
    .page-header h1 { font-size: 1.5rem; }
    .page-header { padding: 32px 0; }
    .card-grid { grid-template-columns: 1fr; }
    .ext-links { grid-template-columns: 1fr; }
    nav { display: none; }
    section { margin: 32px 0; }
}
