:root {
  --primary: #0f766e;
  --primary-dark: #0d5c56;
  --primary-light: #14b8a6;
  --accent: #f59e0b;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --radius: 12px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--primary-dark);
}

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo span {
  color: var(--primary);
}
.logo-badge {
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: #f0fdfa;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Main */
.main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 50%, #14b8a6 100%);
  color: white;
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}
.hero p {
  font-size: 1.05rem;
  opacity: 0.95;
  max-width: 640px;
  margin: 0 auto 1.5rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.35rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: white;
  color: var(--primary-dark);
}
.btn-primary:hover {
  background: #f0fdfa;
  color: var(--primary-dark);
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.35);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  color: white;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
}
.btn-accent {
  background: var(--accent);
  color: #1c1917;
}
.btn-accent:hover {
  background: #d97706;
  color: white;
}

/* Cards grid */
.grid {
  display: grid;
  gap: 1.25rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08);
}
.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}
.card-icon {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

/* Section */
.section {
  margin-bottom: 2.5rem;
}
.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 0.75rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: #f0fdfa;
  font-weight: 600;
  color: var(--primary-dark);
  white-space: nowrap;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: #f8fafc;
}

/* Syllabus */
.syllabus-subject {
  margin-bottom: 2rem;
}
.syllabus-subject h2 {
  background: var(--primary);
  color: white;
  padding: 0.7rem 1.1rem;
  border-radius: 10px 10px 0 0;
  font-size: 1.15rem;
}
.unit {
  border: 1px solid var(--border);
  border-top: none;
  background: var(--card);
}
.unit:last-child {
  border-radius: 0 0 10px 10px;
}
.unit-header {
  padding: 0.85rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.unit-header:hover {
  background: #f0fdfa;
}
.unit-body {
  padding: 0.9rem 1.2rem 1.1rem;
  display: none;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.unit-body.open {
  display: block;
}
.unit-body ul {
  margin-left: 1.2rem;
  margin-top: 0.4rem;
}
.unit-body li {
  margin-bottom: 0.25rem;
}

/* Notice list */
.notice-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.notice-date {
  min-width: 90px;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}
.notice-content h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.notice-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 2.5rem 1.25rem 1.5rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  color: white;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}
.footer-col a {
  display: block;
  color: #94a3b8;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}
.footer-col a:hover {
  color: var(--primary-light);
}
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid #1e293b;
  font-size: 0.85rem;
  text-align: center;
}

/* Consent Banner */
.consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}
.consent-box {
  background: white;
  border-radius: 16px 16px 0 0;
  max-width: 560px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}
.consent-box h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}
.consent-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.consent-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Badge */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #ccfbf1;
  color: var(--primary-dark);
}
.badge-free {
  background: #d1fae5;
  color: #065f46;
}

/* Page header */
.page-header {
  margin-bottom: 1.75rem;
}
.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Callout */
.callout {
  background: #f0fdfa;
  border-left: 4px solid var(--primary);
  padding: 1rem 1.2rem;
  border-radius: 0 10px 10px 0;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}
.callout strong {
  color: var(--primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    width: 100%;
    padding: 0.7rem 1rem;
  }
  .hero {
    padding: 1.75rem 1.25rem;
  }
  .main {
    padding: 1.25rem 1rem 2.5rem;
  }
}

/* Utility */
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
