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

:root {
  --bg: #f6f7fc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --heading: #1e1b4b;
  --indigo: #6366f1;
  --violet: #8b5cf6;
  --fuchsia: #d946ef;
  --border: #e2e8f0;
  --ring: rgba(99, 102, 241, 0.18);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.brand .d {
  background: linear-gradient(90deg, var(--indigo), var(--violet), var(--fuchsia));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.site-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); font-size: 15px; font-weight: 500; }
.site-nav a:hover { color: var(--indigo); text-decoration: none; }
.btn-open {
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  color: #fff !important;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 600;
}
.btn-open:hover { text-decoration: none; filter: brightness(1.08); }

/* ---- Layout ---- */
main { max-width: 1000px; margin: 0 auto; padding: 36px 20px 64px; }

.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--indigo); }

h1 { font-size: 40px; line-height: 1.15; color: var(--heading); margin-bottom: 12px; }
h2 { font-size: 26px; color: var(--heading); margin: 44px 0 14px; }
h3 { font-size: 20px; color: var(--heading); margin: 24px 0 10px; }
p { color: var(--muted); max-width: 72ch; }
ul, ol { margin: 10px 0 10px 22px; color: var(--muted); }
li { margin: 6px 0; }

.lede { font-size: 18px; color: var(--muted); }

/* ---- Cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 26px 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 6px 24px rgba(30, 27, 75, 0.06);
}
.card .k { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.card .v { font-size: 30px; font-weight: 700; color: var(--heading); margin-top: 4px; }

/* ---- CTA ---- */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  color: #fff;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 999px;
  margin: 24px 0;
}
.cta:hover { text-decoration: none; filter: brightness(1.08); }
.cta.c-dark { background: #1e1b4b; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---- Panels ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
}
.panel.tint { background: linear-gradient(180deg, rgba(99,102,241,0.06), rgba(217,70,239,0.05)); }

/* ---- FAQ / details ---- */
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 10px 0;
}
summary { font-weight: 600; color: var(--heading); cursor: pointer; }
details p { margin-top: 10px; }

/* ---- Year chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  color: var(--muted);
}

/* ---- Subject/topic grid ---- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 20px 0; }
.topic {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.topic h3 { margin: 0 0 8px; font-size: 18px; }
.topic p { font-size: 15px; }
.topic .tag {
  display: inline-block;
  background: var(--ring);
  color: var(--indigo);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 12px;
}

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
th { background: #f1f3fb; color: var(--heading); font-weight: 600; }
td { color: var(--muted); }

/* ---- Footer ---- */
.site-footer { background: #0e1127; color: #a5b0d8; }
.site-footer .inner { max-width: 1000px; margin: 0 auto; padding: 40px 20px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.site-footer a { color: #a5b0d8; font-size: 14px; display: block; margin: 6px 0; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.site-footer .brand { color: #fff; margin-bottom: 6px; }
.site-footer .sub { font-size: 13px; }

@media (max-width: 640px) {
  h1 { font-size: 30px; }
  .site-header .inner { flex-direction: column; align-items: flex-start; }
}