:root {
  --ink: #10233f;
  --ink-soft: #42536b;
  --navy: #102b4e;
  --blue: #185adb;
  --blue-soft: #eaf1ff;
  --mint: #16a085;
  --mint-soft: #e5f7f2;
  --lime: #c8f45d;
  --orange: #ff7a45;
  --line: #dce4ee;
  --paper: #ffffff;
  --cloud: #f5f7fb;
  --shadow: 0 18px 55px rgba(16, 35, 63, 0.1);
  --radius: 22px;
  --content: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, -apple-system, sans-serif;
  line-height: 1.68;
  word-break: keep-all;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img, svg { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 999;
  padding: .7rem 1rem;
  color: #fff;
  background: var(--navy);
  border-radius: 10px;
}

.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(220, 228, 238, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(calc(100% - 40px), var(--content));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: -.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--lime);
  font-family: Georgia, serif;
  font-size: 1.22rem;
  font-weight: 800;
}

.main-nav { display: flex; align-items: center; gap: 6px; }

.main-nav a {
  padding: .62rem .78rem;
  color: var(--ink-soft);
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 700;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--blue); background: var(--blue-soft); }

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
}

.menu-button span,
.menu-button::before,
.menu-button::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--navy);
  border-radius: 2px;
}

.container { width: min(calc(100% - 40px), var(--content)); margin: 0 auto; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 72px;
  background:
    radial-gradient(circle at 88% 10%, rgba(200, 244, 93, .42), transparent 19rem),
    linear-gradient(180deg, #f7faff 0%, #fff 100%);
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -220px;
  width: 420px;
  height: 420px;
  border: 72px solid rgba(24, 90, 219, .07);
  border-radius: 50%;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, .82fr);
  align-items: center;
  gap: 68px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--blue);
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 24px;
  height: 3px;
  background: var(--lime);
  border-radius: 2px;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 22px;
  font-size: clamp(2.55rem, 6vw, 5rem);
  line-height: 1.08;
  letter-spacing: -.065em;
}

.hero h1 span { color: var(--blue); }

.hero-lead {
  max-width: 690px;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: clamp(1.03rem, 1.7vw, 1.22rem);
}

.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: .76rem 1.15rem;
  border: 1px solid var(--navy);
  border-radius: 13px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease;
}

.button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 35, 63, .12); }
.button.primary { color: #fff; background: var(--navy); }
.button.secondary { background: #fff; }
.button.small { min-height: 40px; padding: .54rem .8rem; font-size: .88rem; }

.exam-board {
  position: relative;
  min-height: 390px;
  padding: 30px;
  color: #fff;
  background: var(--navy);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.exam-board::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px;
  pointer-events: none;
}

.board-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.board-label { color: var(--lime); font-size: .78rem; font-weight: 850; letter-spacing: .12em; }
.board-year { font-size: .78rem; font-weight: 750; opacity: .72; }
.board-title { margin: 30px 0 24px; font-size: 1.8rem; line-height: 1.25; letter-spacing: -.045em; }
.board-list { display: grid; gap: 10px; }

.board-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  font-weight: 750;
}

.board-list a:hover { background: rgba(255,255,255,.15); }
.board-list strong { color: var(--lime); font-size: .8rem; }

.stats-bar {
  position: relative;
  z-index: 3;
  margin-top: -28px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(16,35,63,.08);
}

.stat { padding: 24px 28px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { display: block; color: var(--blue); font-size: 1.5rem; line-height: 1.2; }
.stat span { color: var(--ink-soft); font-size: .88rem; }

.section { padding: 88px 0; }
.section.muted { background: var(--cloud); }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 34px;
}

.section-heading h2,
.page-title h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.16;
  letter-spacing: -.055em;
}

.section-heading > p { max-width: 540px; margin-bottom: 2px; color: var(--ink-soft); }

.book-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.book-card {
  position: relative;
  min-height: 360px;
  padding: 28px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .22s ease, box-shadow .22s ease;
}

.book-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.book-card::after { content: ""; position: absolute; right: -34px; bottom: -40px; width: 130px; height: 130px; border: 28px solid var(--blue-soft); border-radius: 50%; }
.book-number { color: var(--blue); font-size: .8rem; font-weight: 850; letter-spacing: .08em; }
.book-card h3 { margin: 32px 0 12px; font-size: 1.55rem; line-height: 1.25; letter-spacing: -.04em; }
.book-card p { color: var(--ink-soft); }
.book-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.tag { display: inline-flex; padding: .35rem .62rem; color: var(--navy); background: var(--mint-soft); border-radius: 999px; font-size: .78rem; font-weight: 750; }
.card-link { position: absolute; left: 28px; bottom: 28px; z-index: 2; color: var(--blue); font-weight: 850; }

.route-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.route-step { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.route-step .step-no { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 20px; color: #fff; background: var(--blue); border-radius: 12px; font-weight: 850; }
.route-step h3 { margin-bottom: 8px; font-size: 1.18rem; }
.route-step p { margin-bottom: 0; color: var(--ink-soft); font-size: .94rem; }

.feature-panel {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 48px;
  padding: 44px;
  color: #fff;
  background: var(--navy);
  border-radius: 28px;
}

.feature-panel h2 { font-size: clamp(1.85rem, 3vw, 2.7rem); line-height: 1.2; letter-spacing: -.05em; }
.feature-panel p { color: rgba(255,255,255,.75); }
.principle-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.principle { padding: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; }
.principle strong { display: block; margin-bottom: 4px; color: var(--lime); }
.principle span { font-size: .9rem; color: rgba(255,255,255,.74); }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 19px 6px; cursor: pointer; font-weight: 800; list-style: none; }
.faq summary::after { content: "+"; float: right; color: var(--blue); font-size: 1.25rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { max-width: 840px; padding: 0 6px 20px; margin: 0; color: var(--ink-soft); }

.page-hero { padding: 64px 0 48px; background: linear-gradient(180deg, var(--blue-soft), #fff); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; color: var(--ink-soft); font-size: .85rem; }
.breadcrumb a:hover { color: var(--blue); }
.page-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; }
.page-title p { max-width: 720px; margin: 16px 0 0; color: var(--ink-soft); font-size: 1.03rem; }
.title-badge { min-width: 140px; padding: 18px 22px; color: #fff; background: var(--navy); border-radius: 18px; text-align: center; }
.title-badge strong { display: block; color: var(--lime); font-size: 2rem; line-height: 1.15; }
.title-badge span { font-size: .82rem; opacity: .8; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: start; gap: 40px; }
.article-section { margin-bottom: 56px; }
.article-section h2 { margin-bottom: 20px; font-size: 1.7rem; letter-spacing: -.045em; }
.article-section > p { color: var(--ink-soft); }

.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.guide-card {
  position: relative;
  min-height: 260px;
  padding: 30px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.guide-card:hover { transform: translateY(-4px); border-color: #aebfda; box-shadow: var(--shadow); }
.guide-card.accent { background: var(--navy); border-color: var(--navy); }
.guide-card.accent h2 { color: #fff; }
.guide-card.accent p { color: rgba(255,255,255,.72); }
.guide-card.accent .guide-label, .guide-card.accent .card-arrow { color: var(--lime); }
.guide-label { color: var(--blue); font-size: .76rem; font-weight: 850; letter-spacing: .1em; }
.guide-card h2 { margin: 30px 0 12px; font-size: 1.55rem; line-height: 1.25; letter-spacing: -.04em; }
.guide-card p { margin-bottom: 45px; color: var(--ink-soft); }
.card-arrow { position: absolute; left: 30px; bottom: 26px; color: var(--blue); font-size: .9rem; font-weight: 850; }

.check-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.check-list li { padding: 15px 17px; background: var(--cloud); border: 1px solid var(--line); border-radius: 13px; }

.example-box { margin: 24px 0; padding: 24px; color: #fff; background: var(--navy); border-radius: 18px; }
.example-box strong { display: block; margin-bottom: 12px; color: var(--lime); }
.example-box p { margin-bottom: 8px; color: rgba(255,255,255,.78); }
.example-box p:last-child { margin-bottom: 0; }

.lesson-article { max-width: none; }

.lesson-key {
  display: grid;
  gap: 7px;
  margin: 24px 0;
  padding: 24px;
  color: #fff;
  background: var(--navy);
  border-radius: 18px;
}

.lesson-key span { color: var(--lime); font-size: .78rem; font-weight: 850; letter-spacing: .08em; }
.lesson-key strong { font-size: 1.15rem; line-height: 1.5; }
.write-space { min-width: 220px; color: #8793a4; }

.lesson-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.filter-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 30px;
  padding: 12px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
}
.filter-box input { width: 100%; padding: 3px; color: var(--ink); border: 0; outline: 0; background: transparent; }

.chapter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chapter-card { display: flex; min-height: 96px; align-items: flex-start; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.chapter-card:hover { border-color: #aebfda; box-shadow: 0 8px 22px rgba(16,35,63,.07); }
.chapter-no { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 11px; font-size: .82rem; font-weight: 850; }
.chapter-card h3 { margin: 2px 0 3px; font-size: 1rem; line-height: 1.36; }
.chapter-card p { margin: 0; color: var(--ink-soft); font-size: .82rem; }
.chapter-card.is-hidden { display: none; }

.sidebar { position: sticky; top: 98px; }
.side-card { margin-bottom: 14px; padding: 20px; background: var(--cloud); border: 1px solid var(--line); border-radius: 16px; }
.side-card h2, .side-card h3 { margin-bottom: 12px; font-size: 1rem; }
.side-card ul { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); font-size: .87rem; }
.side-card a { color: var(--blue); font-weight: 750; }

.note-box { margin: 24px 0; padding: 22px 24px; background: var(--mint-soft); border-left: 4px solid var(--mint); border-radius: 0 16px 16px 0; }
.note-box strong { display: block; margin-bottom: 5px; }
.note-box p { margin: 0; color: var(--ink-soft); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.study-table { width: 100%; border-collapse: collapse; background: #fff; }
.study-table th, .study-table td { padding: 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.study-table th { color: var(--navy); background: var(--cloud); font-size: .88rem; }
.study-table tr:last-child td { border-bottom: 0; }

.legal { max-width: 820px; }
.legal h2 { margin: 38px 0 12px; font-size: 1.35rem; }
.legal p, .legal li { color: var(--ink-soft); }

.site-footer { padding: 52px 0 30px; color: rgba(255,255,255,.72); background: #0b1c32; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 50px; }
.footer-brand { color: #fff; font-size: 1.12rem; font-weight: 850; }
.footer-grid h2 { margin-bottom: 12px; color: #fff; font-size: .9rem; }
.footer-grid p, .footer-grid a { font-size: .86rem; }
.footer-links { display: grid; gap: 6px; }
.footer-links a:hover { color: var(--lime); }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .78rem; }

.empty-message { display: none; padding: 24px; color: var(--ink-soft); background: var(--cloud); border-radius: 15px; text-align: center; }
.empty-message.is-visible { display: block; }

@media (max-width: 920px) {
  .menu-button { display: block; }
  .main-nav { position: absolute; top: 74px; left: 0; right: 0; display: none; padding: 14px 20px 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 14px 30px rgba(16,35,63,.08); }
  .main-nav.is-open { display: grid; }
  .main-nav a { border-radius: 10px; }
  .hero-grid, .feature-panel, .content-layout { grid-template-columns: 1fr; }
  .hero-grid { gap: 40px; }
  .book-grid { grid-template-columns: 1fr; }
  .book-card { min-height: 300px; }
  .sidebar { position: static; }
  .page-title { grid-template-columns: 1fr; }
  .title-badge { justify-self: start; }
}

@media (max-width: 640px) {
  body { word-break: normal; }
  .header-inner, .container { width: min(calc(100% - 28px), var(--content)); }
  .hero { padding-top: 62px; }
  h1 { font-size: 2.65rem; }
  .exam-board { min-height: auto; padding: 24px; }
  .stats-grid, .route-grid, .principle-list, .chapter-grid, .guide-grid, .footer-grid { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .section { padding: 64px 0; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 12px; }
  .feature-panel { padding: 28px 22px; gap: 24px; }
  .page-hero { padding-top: 42px; }
  .page-title h1 { font-size: 2.2rem; }
  .lesson-nav { align-items: stretch; flex-direction: column; }
  .lesson-nav .button { width: 100%; }
}

@media print {
  .site-header, .site-footer, .button-row, .filter-box, .sidebar { display: none !important; }
  .section, .page-hero { padding: 20px 0; }
  .content-layout { display: block; }
  .chapter-card { break-inside: avoid; }
}
