:root {
  --primary: #1e3a8a;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --accent: #06b6d4;
  --accent-soft: #cffafe;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #059669;
  --danger: #dc2626;
  --shadow: 0 4px 14px -2px rgb(30 58 138 / 0.08), 0 2px 6px -2px rgb(0 0 0 / 0.04);
  --radius: 14px;
  --radius-sm: 10px;
}

* { 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.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* 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: 1140px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-weight: 800;
  font-size: 1.28rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: -0.02em;
}
.logo span { color: var(--primary); }
.logo-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-size: 0.62rem;
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  border-radius: 9px;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: #eff6ff;
}

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

/* Main */
.main {
  flex: 1;
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 1.85rem 1.25rem 3.25rem;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 45%, #2563eb 100%);
  color: white;
  border-radius: var(--radius);
  padding: 2.75rem 2rem;
  margin-bottom: 2.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(6,182,212,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.8rem;
  line-height: 1.22;
  letter-spacing: -0.025em;
  position: relative;
}
.hero p {
  font-size: 1.05rem;
  opacity: 0.93;
  max-width: 620px;
  margin: 0 auto 1.6rem;
  position: relative;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  position: relative;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.4rem;
  border-radius: 11px;
  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);
}
.btn-primary:hover {
  background: #f0f9ff;
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(0,0,0,0.15);
}
.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.35);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.22);
  color: white;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary-light);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-accent {
  background: var(--accent);
  color: #0c4a6e;
}
.btn-accent:hover {
  background: #0891b2;
  color: white;
}

/* Cards */
.grid { display: grid; gap: 1.3rem; }
.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.45rem;
  box-shadow: var(--shadow);
  transition: transform 0.22s, box-shadow 0.22s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgb(30 58 138 / 0.12);
}
.card h3 {
  font-size: 1.12rem;
  margin-bottom: 0.45rem;
  color: var(--text);
  font-weight: 700;
}
.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin-bottom: 0.85rem;
}

/* Section */
.section { margin-bottom: 2.6rem; }
.section-title {
  font-size: 1.4rem;
  font-weight: 750;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: -0.02em;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
  margin-left: 0.6rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  padding: 0.8rem 1.05rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: linear-gradient(180deg, #eff6ff, #f8fafc);
  font-weight: 650;
  color: var(--primary);
  white-space: nowrap;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* Syllabus */
.syllabus-subject { margin-bottom: 2.1rem; }
.syllabus-subject h2 {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 0.8rem 1.2rem;
  border-radius: 12px 12px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
}
.unit {
  border: 1px solid var(--border);
  border-top: none;
  background: var(--card);
}
.unit:last-child { border-radius: 0 0 12px 12px; }
.unit-header {
  padding: 0.9rem 1.15rem;
  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;
  font-size: 0.95rem;
}
.unit-header:hover { background: #eff6ff; }
.unit-body {
  padding: 0.95rem 1.25rem 1.15rem;
  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.28rem; }

/* Notice */
.notice-item {
  display: flex;
  gap: 1.1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--border);
}
.notice-date {
  min-width: 95px;
  font-size: 0.84rem;
  color: var(--primary);
  font-weight: 650;
}
.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.75rem 1.25rem 1.6rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.1rem;
  margin-bottom: 2.1rem;
}
.footer-col h4 {
  color: white;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
  font-weight: 650;
}
.footer-col a {
  display: block;
  color: #94a3b8;
  font-size: 0.88rem;
  margin-bottom: 0.42rem;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1140px;
  margin: 0 auto;
  padding-top: 1.35rem;
  border-top: 1px solid #1e293b;
  font-size: 0.85rem;
  text-align: center;
}

/* Consent */
.consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.consent-box {
  background: white;
  border-radius: 18px 18px 0 0;
  max-width: 540px;
  width: 100%;
  padding: 1.85rem;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.22);
}
.consent-box h3 { font-size: 1.18rem; margin-bottom: 0.55rem; }
.consent-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.3rem;
}
.consent-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Page header */
.page-header { margin-bottom: 1.85rem; }
.page-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  letter-spacing: -0.025em;
}
.page-header p { color: var(--text-muted); font-size: 1.02rem; }

/* Callout */
.callout {
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border-left: 4px solid var(--primary-light);
  padding: 1.05rem 1.25rem;
  border-radius: 0 12px 12px 0;
  margin: 1.3rem 0;
  font-size: 0.95rem;
}
.callout strong { color: var(--primary); }

/* Badge */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 650;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--primary);
}

/* 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.8rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; padding: 0.75rem 1rem; }
  .hero { padding: 2rem 1.35rem; }
  .main { padding: 1.35rem 1rem 2.6rem; }
}

.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
