/* ── DESIGN TOKENS — Forest & Chalk ─────────────────────────────────── */
:root {
  --navy:       #2B5C3F;
  --navy-deep:  #1B4332;
  --gold:       #52B788;
  --gold-light: #74C69D;
  --bg:         #F8F7F3;
  --surface:    #FFFFFF;
  --text:       #1C1C1A;
  --text-mid:   #546158;
  --text-soft:  #8F9E92;
  --border:     #DBE8DE;
  --shadow:     0 2px 20px rgba(27,67,50,0.09);
  --shadow-lg:  0 10px 40px rgba(27,67,50,0.18);
  --r:          20px;
  --r-sm:       12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:       #0D1C12;
    --surface:  #132018;
    --text:     #EEF3EF;
    --text-mid: #8FA896;
    --text-soft:#5A7060;
    --border:   #1C3325;
    --shadow:   0 2px 20px rgba(0,0,0,0.35);
    --shadow-lg:0 10px 40px rgba(0,0,0,0.45);
  }
}
:root[data-theme="dark"] {
  --bg:       #0D1C12;
  --surface:  #132018;
  --text:     #EEF3EF;
  --text-mid: #8FA896;
  --text-soft:#5A7060;
  --border:   #1C3325;
  --shadow:   0 2px 20px rgba(0,0,0,0.35);
  --shadow-lg:0 10px 40px rgba(0,0,0,0.45);
}

/* ── RESET & BASE ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ───────────────────────────────────────────────────────── */
.display {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-weight: 800;
}

/* ── NAV ──────────────────────────────────────────────────────────────── */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 44px;
  position: relative;
  z-index: 100;
}
.nav-school {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-badge {
  background: var(--navy);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
}
.nav-school-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.03em;
}

/* Course Info button */
.ci-wrapper { position: relative; }
.ci-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  letter-spacing: 0.01em;
}
.ci-btn:hover { background: var(--navy-deep); }
.ci-btn .chevron { transition: transform 0.25s ease; }
.ci-btn.open .chevron { transform: rotate(180deg); }
.ci-btn .close-x { display: none; }
.ci-btn.open .menu-bars { display: none; }
.ci-btn.open .close-x { display: block; }
.ci-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 10px;
  min-width: 310px;
  z-index: 200;
  border: 1px solid var(--border);
}
.dropdown.open { display: block; }
.dd-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 11px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  cursor: pointer;
}
.dd-item:hover { background: var(--bg); }
.dd-icon {
  width: 36px; height: 36px;
  background: var(--bg);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.dd-icon svg { width: 17px; height: 17px; color: var(--navy); }
.dd-title { font-size: 13.5px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.dd-desc  { font-size: 12px; color: var(--text-mid); margin-top: 3px; line-height: 1.4; }

/* ── HERO ─────────────────────────────────────────────────────────────── */
.hero {
  padding: 28px 44px 36px;
  max-width: 1400px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 16px;
}
.hero-eyebrow::before {
  content: '';
  width: 24px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
}
.hero h1 {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(52px, 9vw, 100px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
  text-wrap: balance;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--navy);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero h1 em { color: var(--gold); }
}
:root[data-theme="dark"] .hero h1 em { color: var(--gold); }

.hero-sub {
  font-size: 15px;
  color: var(--text-mid);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-sub::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--gold);
  border-radius: 50%;
  display: inline-block;
}

/* ── COURSE CARDS GRID ────────────────────────────────────────────────── */
.courses-section {
  padding: 4px 44px 60px;
}
.courses-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
  gap: 18px;
  height: 420px;
}
@media (max-width: 800px) {
  .courses-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .course-card { min-height: 300px; }
  .top-nav, .hero, .courses-section { padding-left: 20px; padding-right: 20px; }
}

/* ── COURSE CARD ──────────────────────────────────────────────────────── */
.course-card {
  border-radius: var(--r);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  text-decoration: none;
  display: block;
  height: 100%;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.course-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

/* Card backgrounds — three forest-green registers */
.card-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.bg-econ {
  background: linear-gradient(145deg, #1B4332 0%, #2D6A4F 45%, #3A8560 80%, #2D6A4F 100%);
}
.bg-micro {
  background: linear-gradient(145deg, #12291C 0%, #1E4230 45%, #2A5940 80%, #1E4230 100%);
}
.bg-macro {
  background: linear-gradient(145deg, #0E2017 0%, #192D20 45%, #233B2B 80%, #19321F 100%);
}

/* Noise texture overlay */
.card-noise {
  position: absolute; inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* Bottom gradient for text legibility */
.card-vignette {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 20%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.60) 100%);
}

/* Decorative icon */
.card-deco {
  position: absolute;
  top: 28px; right: 28px;
  width: 88px; height: 88px;
  opacity: 0.14;
}

/* Card content */
.card-body {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}
.card-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.60);
  margin-bottom: 10px;
}
.card-title {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  text-wrap: balance;
}
.card-desc {
  font-size: 12.5px;
  color: rgba(255,255,255,0.68);
  line-height: 1.55;
  margin-bottom: 20px;
}
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255,255,255,0.30);
  border-radius: 100px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
  font-family: inherit;
  transition: background 0.18s;
  text-decoration: none;
  cursor: pointer;
}
.course-card:hover .card-cta { background: rgba(255,255,255,0.26); }
.card-cta svg { width: 14px; height: 14px; }

/* Sage accent line at card top */
.card-accent {
  position: absolute;
  top: 0; left: 28px; right: 28px;
  height: 2px;
  background: linear-gradient(90deg, rgba(115,199,152,0.8), transparent);
  border-radius: 0 0 2px 2px;
}

/* ── FOOTER ───────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.50);
  text-align: center;
  padding: 18px 40px;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.site-footer strong { color: var(--gold-light); font-weight: 700; }

/* ── PREVIEW BANNER ───────────────────────────────────────────────────── */
.preview-note {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  text-align: center;
  padding: 9px 20px;
  letter-spacing: 0.04em;
}
.preview-note strong { color: var(--gold-light); }

/* ── INNER PAGE HEADERS ───────────────────────────────────────────────── */
.page-header {
  color: #fff;
  padding: 32px 44px 36px;
}
.page-header.bg-econ {
  background: linear-gradient(145deg, #1B4332 0%, #2D6A4F 45%, #3A8560 80%, #2D6A4F 100%);
}
.page-header.bg-micro {
  background: linear-gradient(145deg, #12291C 0%, #1E4230 45%, #2A5940 80%, #1E4230 100%);
}
.page-header.bg-macro {
  background: linear-gradient(145deg, #0E2017 0%, #192D20 45%, #233B2B 80%, #19321F 100%);
}
.page-header h1 {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 5vw, 48px);
  letter-spacing: -0.02em;
  margin-bottom: 0;
}
.page-header .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 16px;
  transition: color 0.15s;
}
.page-header .back-link:hover { color: #fff; }
.page-header-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.60);
  margin-bottom: 10px;
}
.page-header-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  margin-top: 8px;
  font-weight: 500;
}

/* ── CONTENT AREA ─────────────────────────────────────────────────────── */
.content-area {
  padding: 40px 44px 80px;
  max-width: 900px;
}

/* ── UNIT BLOCKS ──────────────────────────────────────────────────────── */
.unit-block {
  margin-bottom: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--border);
}
.unit-block:last-child {
  border-bottom: none;
}
.unit-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.unit-title {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.unit-desc {
  font-size: 14.5px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 16px;
}
.unit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.unit-link:hover {
  color: var(--gold);
  border-color: var(--gold-light);
}

/* ── OUTLINE-SPECIFIC ─────────────────────────────────────────────────── */
.outline-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding: 20px 24px;
  background: var(--surface);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.outline-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.outline-meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.outline-meta-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.outline-section-title {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  margin-top: 28px;
  letter-spacing: -0.01em;
}
.outline-section-title:first-child { margin-top: 0; }
.grade-table-wrap { overflow-x: auto; }
.grade-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.grade-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 8px 12px;
  border-bottom: 2px solid var(--border);
}
.grade-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.grade-table tr:last-child td { border-bottom: none; }
.grade-table tr:hover td { background: var(--bg); }
.grade-weight {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--navy);
}
.unit-topics-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.unit-topics-list li {
  padding: 8px 0 8px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.5;
  position: relative;
}
.unit-topics-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 16px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.unit-topics-list li:last-child { border-bottom: none; }

/* ── TABLES (calendar pages) ──────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 8px 12px;
  border-bottom: 2px solid var(--border);
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

@media (max-width: 800px) {
  .top-nav { padding-left: 20px; padding-right: 20px; }
  .page-header, .content-area { padding-left: 20px; padding-right: 20px; }
  .outline-meta { gap: 16px; }
}
