:root {
  --navy: #0b1f44;
  --navy-2: #0f2f6b;
  --blue: #1565e8;
  --blue-dark: #0f52c2;
  --blue-soft: #e6f0fd;
  --text: #14203a;
  --muted: #5b6678;
  --line: #e2e8f1;
  --bg: #ffffff;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(15, 47, 107, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; flex: none; }
.ico { width: 1em; height: 1em; flex: none; display: block; object-fit: contain; }
.ico-white { filter: brightness(0) invert(1); }
h1, h2, h3, p { margin: 0; }
.container { width: min(1240px, 100% - 48px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 32px; height: 60px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 52px; width: auto; display: block; }
.main-nav { display: flex; gap: 40px; margin-left: auto; margin-right: auto; font-size: 15px; font-weight: 500; }
.main-nav a { padding: 18px 0 14px; border-bottom: 2px solid transparent; transition: color .15s; }
.main-nav a:hover { color: var(--blue); }
.main-nav a.active { color: var(--blue); border-color: var(--blue); }
.header-actions { display: flex; gap: 18px; }
.icon-btn { background: none; border: 0; padding: 6px; font-size: 28px; color: var(--navy); cursor: pointer; border-radius: 8px; display: grid; place-items: center; }
.icon-btn:hover { background: var(--blue-soft); }
.menu-toggle { display: none; }

/* Hero */
.hero { position: relative; color: #fff; padding: 30px 0 90px; min-height: 360px; overflow: hidden; }
.hero-art { position: absolute; inset: 0; z-index: 0; background: #0b2a5c; }
.hero-art img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 70% center; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,22,52,.35) 0%, rgba(6,22,52,0) 55%); }
.hero-content { position: relative; z-index: 1; }
.pill-tag {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  background: rgba(20, 50, 105, .75); border: 1px solid rgba(255,255,255,.12);
  font-size: 12px; font-weight: 600; letter-spacing: .14em; margin-bottom: 14px;
}
.hero h1 { font-size: clamp(38px, 5.2vw, 64px); line-height: 1.02; font-weight: 800; letter-spacing: -.02em; }
.lead { margin-top: 14px; font-size: clamp(16px, 1.6vw, 21px); color: #e3ecfb; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 0 24px; height: 52px; border-radius: 6px; font-weight: 600; font-size: 16px;
  border: 1.5px solid transparent; cursor: pointer; font-family: inherit;
  transition: background .15s, transform .15s, border-color .15s;
}
.btn .ico { font-size: 26px; }
.btn .ico:last-child { font-size: 20px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline { border-color: rgba(255,255,255,.85); color: #fff; background: rgba(8,26,60,.25); }
.btn-outline:hover { background: rgba(255,255,255,.14); }
.btn-block { width: 100%; }

/* Search */
.search-card {
  position: relative; z-index: 2; margin-top: -68px;
  display: flex; align-items: center; gap: 14px;
  background: #fff; padding: 12px 16px; border-radius: var(--radius); box-shadow: var(--shadow);
}
.search-field {
  flex: 1; display: flex; align-items: center; gap: 14px; height: 48px;
  border: 1px solid var(--line); border-radius: 6px; padding: 0 16px; color: var(--navy); font-size: 22px;
}
.search-field .ico { font-size: 26px; }
.search-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,101,232,.15); }
.search-field input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; color: var(--text); background: transparent; min-width: 0; }
.search-field input::placeholder { color: #7a8497; }
.chips { display: flex; gap: 10px; }
.chip {
  border: 0; background: #f1f4f9; color: var(--text); font: inherit; font-size: 14px;
  padding: 10px 20px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.chip:hover { background: var(--blue-soft); color: var(--blue); }
.btn-search { height: 44px; padding: 0 52px; }

/* Sections */
.section { padding-top: 36px; }
.section-title { font-size: 32px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; display: flex; align-items: center; gap: 16px; line-height: 1.15; }
.section-sub { color: var(--muted); margin-top: 4px; font-size: 17px; }
.title-line { width: 52px; height: 2px; background: var(--blue); }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-weight: 500; font-size: 14px; }
.link-arrow .ico { font-size: 17px; transition: transform .15s; }
.link-arrow:hover .ico { transform: translateX(3px); }

.split > * { min-width: 0; }
.split { display: grid; grid-template-columns: 1fr 276px; gap: 24px; align-items: start; }
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.course-card {
  display: flex; gap: 16px; padding: 14px 16px 14px 14px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); min-height: 134px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.course-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #c9d8f0; }
.course-card[hidden] { display: none; }
.course-icon { width: 72px; height: 72px; border-radius: 8px; background: var(--blue-soft); display: grid; place-items: center; font-size: 42px; flex: none; }
.course-card h3 { font-size: 17px; font-weight: 700; color: var(--navy); line-height: 1.25; }
.course-card p { font-size: 14px; color: var(--muted); margin: 6px 0 12px; line-height: 1.45; }
.no-result { margin-top: 16px; color: var(--muted); }

/* Test card */
.test-card {
  background: linear-gradient(180deg, #e8f2fe, #dcebfd); border: 1px solid #d3e4fa;
  border-radius: var(--radius); padding: 24px 20px 20px; display: flex; flex-direction: column; min-height: 100%;
}
.test-top { display: block; width: calc(100% + 8px); max-width: none; height: auto; margin: -4px -4px 4px; }
.test-card h3 { font-size: 26px; font-weight: 800; color: var(--navy); margin-top: 6px; letter-spacing: -.01em; }
.test-card p { color: var(--text); margin-top: 6px; font-size: 16px; }
.test-progress { display: block; width: 176px; max-width: 100%; height: auto; margin: 12px auto 16px; }

/* Notes */
.note-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.note-card { display: flex; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px 8px 8px; transition: box-shadow .2s, transform .2s; cursor: pointer; }
.note-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.note-thumb { width: 152px; min-height: 96px; border-radius: 6px; flex: none; display: grid; place-items: center; color: rgba(255,255,255,.95); overflow: hidden; }
.note-thumb .ico { font-size: 56px; }
.thumb-sunset { background: linear-gradient(180deg, #1e4a8a 0%, #e98a4a 70%, #f6c26b 100%); }
.thumb-tower  { background: linear-gradient(180deg, #4a90d9 0%, #a9cdee 100%); }
.thumb-cloud  { background: radial-gradient(circle at 60% 40%, #8ec0f0, #2f6fc0 80%); }
.note-card h3 { font-size: 17px; font-weight: 700; color: var(--navy); margin-top: 6px; }
.note-card p { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* Glossary */
.glossary { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: center; background: var(--blue-soft); border-radius: var(--radius); padding: 28px 32px; }
.terms { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.terms div { background: #fff; border-radius: 8px; padding: 12px 16px; display: flex; justify-content: space-between; gap: 12px; }
.terms dt { font-weight: 700; color: var(--navy); }
.terms dd { margin: 0; color: var(--muted); }

/* Footer */
.site-footer { margin-top: 56px; background: var(--navy); color: #c7d4ee; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0; flex-wrap: wrap; }
.footer-inner nav { display: flex; gap: 24px; }
.footer-inner a:hover { color: #fff; }

/* Responsive */
@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .note-grid { grid-template-columns: 1fr; }
  .test-card { display: grid; grid-template-columns: 1fr 190px; grid-template-areas: "top prog" "title prog" "text prog" "btn prog"; column-gap: 24px; align-items: center; padding: 20px 24px; }
  .test-top { grid-area: top; width: 240px; margin: 0; }
  .test-card h3 { grid-area: title; }
  .test-card p { grid-area: text; }
  .test-card .btn { grid-area: btn; width: 220px; margin-top: 14px; }
  .test-progress { grid-area: prog; width: 100%; margin: 0; }
  .main-nav { gap: 24px; }
}
@media (max-width: 900px) {
  .menu-toggle { display: grid; }
  .header-inner { gap: 12px; }
  .header-actions { margin-left: auto; gap: 6px; }
  .main-nav {
    position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0;
    background: #fff; border-bottom: 1px solid var(--line); display: none; padding: 8px 24px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .search-card { flex-wrap: wrap; margin-top: -40px; }
  .search-field { flex-basis: 100%; }
  .chips { flex-wrap: wrap; flex: 1; }
  .glossary { grid-template-columns: 1fr; }
  .hero-art img { object-position: 78% center; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 32px); }
  .brand-logo { height: 40px; }
  .course-grid, .terms { grid-template-columns: 1fr; }
  .note-card { flex-direction: column; padding: 8px; }
  .note-thumb { width: 100%; min-height: 120px; }
  .btn-search { width: 100%; }
  .hero { padding: 22px 0 84px; min-height: 0; }
  .hero-art img { object-position: 82% bottom; }
  .hero-shade { background: linear-gradient(180deg, rgba(6,22,52,.78) 0%, rgba(6,22,52,.55) 55%, rgba(6,22,52,0) 100%); }
  .lead { font-size: 16px; }
  .hero-cta { margin-top: 20px; }
  .hero-cta .btn { height: 48px; font-size: 15px; }
  .test-card { grid-template-columns: 1fr; grid-template-areas: "top" "title" "text" "prog" "btn"; padding: 20px; }
  .test-top { width: 100%; }
  .test-progress { width: 170px; margin: 12px auto 16px; }
  .test-card .btn { width: 100%; }
  .course-card { min-height: 0; }
  .note-thumb { min-height: 100px; }
  .search-field { padding: 0 12px; gap: 10px; }
  .search-field input { font-size: 15px; }
  .glossary { padding: 20px 16px; gap: 18px; }
  .terms div { padding: 10px 12px; }
  .hero-cta .btn { width: 100%; }
  .section-title { font-size: 26px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}
