:root {
  --bg: #fbfaf6;
  --surface: #ffffff;
  --ink: #1b2340;
  --muted: #5f6783;
  --line: #e7e5dc;
  --brand: #1b2340;
  --accent: #ffb020;
  --accent-ink: #2a1c00;
  --soft: #f3f0e6;
  --shadow: 0 1px 2px rgba(27, 35, 64, 0.06), 0 8px 24px rgba(27, 35, 64, 0.06);
}
:root:not([data-theme="light"]) {
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11152a;
    --surface: #1a1f3a;
    --ink: #eceefa;
    --muted: #a3a9c7;
    --line: #2b3157;
    --brand: #eceefa;
    --soft: #202648;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11152a;
  --surface: #1a1f3a;
  --ink: #eceefa;
  --muted: #a3a9c7;
  --line: #2b3157;
  --brand: #eceefa;
  --soft: #202648;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.75;
  font-size: 16px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
a { color: inherit; }
img, svg { max-width: 100%; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.block { padding-top: 40px; padding-bottom: 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--brand); color: var(--bg); font-weight: 900; font-size: 20px; transform: rotate(-4deg); box-shadow: 3px 3px 0 var(--accent); }
.logo.sm { width: 28px; height: 28px; font-size: 15px; border-radius: 9px; box-shadow: 2px 2px 0 var(--accent); }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; font-weight: 900; font-size: 20px; }
.brand-name small { font-weight: 500; font-size: 11px; color: var(--muted); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: 15px; color: var(--muted); }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.tools { display: flex; gap: 2px; }
.icon-btn { width: 40px; height: 40px; border: 0; background: transparent; border-radius: 50%; font-size: 18px; cursor: pointer; color: var(--ink); }
.icon-btn:hover { background: var(--soft); }
.icon-btn.menu { display: none; }

/* search */
.search { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 0; }
.search input { width: 100%; padding: 12px 16px; font: inherit; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); }
.results { list-style: none; margin: 8px 0 0; padding: 0; max-height: 50vh; overflow: auto; }
.results a { display: block; padding: 10px 12px; text-decoration: none; border-radius: 10px; }
.results a:hover { background: var(--soft); }
.results small { color: var(--muted); margin-left: 6px; }

/* hero */
.hero { background: linear-gradient(160deg, #1b2340 0%, #2c3563 60%, #3a2f6b 100%); color: #fff; position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; opacity: 0.18; }
.hero::before { width: 360px; height: 360px; background: var(--accent); right: -80px; top: -120px; }
.hero::after { width: 220px; height: 220px; background: #7c8cff; left: -60px; bottom: -100px; }
.hero-in { position: relative; padding-top: 72px; padding-bottom: 56px; z-index: 1; }
.eyebrow { display: inline-block; margin: 0 0 16px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-size: 13px; font-weight: 500; }
.hero h1 { margin: 0; font-size: clamp(36px, 7vw, 64px); line-height: 1.15; font-weight: 900; letter-spacing: -0.02em; }
.hl { background: linear-gradient(transparent 62%, var(--accent) 62%); color: #fff; }
.hero .lead { max-width: 560px; font-size: 18px; color: #d8dcf3; margin: 16px 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid currentColor; }
.hero .btn { color: #fff; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) !important; }
.btn:hover { transform: translateY(-1px); }
.stats { display: flex; flex-wrap: wrap; gap: 28px; list-style: none; padding: 0; margin: 40px 0 0; }
.stats b { font-size: 28px; font-weight: 900; margin-right: 6px; color: var(--accent); }
.stats span { color: #c3c8e6; font-size: 14px; }

/* sections */
.sec { font-size: 22px; font-weight: 900; margin: 0 0 18px; letter-spacing: -0.01em; }
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat { display: block; text-decoration: none; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-top: 6px solid var(--c); transition: transform 0.15s; }
.cat:hover { transform: translateY(-3px); }
.cat-emoji { font-size: 32px; }
.cat h3 { margin: 8px 0 4px; font-size: 20px; }
.cat p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.more { font-weight: 700; color: var(--ink); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); position: relative; transition: transform 0.15s, box-shadow 0.15s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .tag { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--ink); }
.card h3 { margin: 0; font-size: 18px; line-height: 1.4; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; font-size: 12px; color: var(--muted); }
.callout { background: var(--soft); border-radius: 20px; padding: 28px; border: 1px dashed var(--line); }
.callout h2 { margin: 0 0 8px; font-size: 20px; }
.callout ol { margin: 0; padding-left: 22px; }
.callout li { margin: 6px 0; }

/* page heads */
.page-head { padding: 48px 0 28px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--c, var(--accent)) 12%, transparent), transparent); }
.page-head.plain { --c: var(--accent); }
.page-head h1 { margin: 6px 0 8px; font-size: clamp(28px, 5vw, 40px); font-weight: 900; line-height: 1.25; }
.crumb { font-size: 13px; color: var(--muted); margin: 0; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.page-head .lead { margin: 0; color: var(--muted); font-size: 17px; max-width: 640px; }
.note { margin: 16px 0 0; padding: 12px 16px; border-left: 4px solid var(--accent); background: var(--soft); border-radius: 0 12px 12px 0; font-size: 14px; color: var(--muted); }

/* post */
.post-head { padding: 44px 0 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, transparent), transparent); }
.post-head h1 { margin: 8px 0 10px; font-size: clamp(26px, 5vw, 38px); font-weight: 900; line-height: 1.32; letter-spacing: -0.01em; }
.byline { margin: 0; color: var(--muted); font-size: 14px; }
.prose { font-size: 17px; padding-bottom: 8px; }
.prose p { margin: 0 0 1.3em; }
.prose h2 { font-size: 22px; font-weight: 900; margin: 2em 0 0.6em; padding-left: 12px; border-left: 5px solid var(--c, var(--accent)); line-height: 1.4; }
.prose ul { margin: 0 0 1.4em; padding-left: 1.2em; }
.prose li { margin: 0.35em 0; }
.prose li::marker { color: var(--c, var(--accent)); }
.prose a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.prose blockquote {
  margin: 1.8em 0;
  padding: 18px 22px;
  background: var(--soft);
  border-left: 5px solid var(--c, var(--accent));
  border-radius: 0 16px 16px 0;
  font-style: normal;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.prose blockquote p { margin: 0 0 0.8em; }
.prose blockquote p:last-child { margin: 0; font-weight: 500; font-size: 14.5px; color: var(--muted); }

/* post visual illustration card */
.post-visual {
  margin: 0 0 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c, var(--accent)) 16%, var(--surface)), var(--surface));
  border: 1px solid var(--line);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow);
}
.post-visual-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: var(--c, var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 32px;
  flex-shrink: 0;
  box-shadow: 0 8px 16px color-mix(in srgb, var(--c, var(--accent)) 35%, transparent);
}
.post-visual-info h3 { margin: 0 0 4px; font-size: 18px; font-weight: 900; }
.post-visual-info p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* CBT Interactive Exam Samples Box */
.exam-section {
  margin: 2.8em 0;
  padding: 28px;
  border-radius: 24px;
  background: var(--surface);
  border: 2px solid color-mix(in srgb, var(--c, var(--accent)) 30%, var(--line));
  box-shadow: var(--shadow);
}
.exam-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--line);
}
.exam-badge {
  background: var(--c, var(--accent));
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.exam-section-header h2 {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 21px !important;
  color: var(--ink);
}
.exam-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  transition: transform 0.15s;
}
.exam-item:last-child { margin-bottom: 0; }
.exam-item-meta {
  font-size: 13px;
  font-weight: 700;
  color: var(--c, var(--accent));
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.exam-question {
  font-weight: 700;
  font-size: 16.5px;
  margin-bottom: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.exam-options {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 16px !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.exam-option-btn {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.exam-option-btn:hover {
  border-color: var(--c, var(--accent));
  background: var(--soft);
}
.exam-option-btn.correct {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.12) !important;
  font-weight: 700;
  color: #065f46;
}
.exam-option-btn.wrong {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
  color: #991b1b;
}
.exam-explanation-box {
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--soft);
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.65;
  border-left: 4px solid var(--c, var(--accent));
}
.exam-exp-title {
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.disclaimer { margin-top: 2.2em !important; padding: 14px 16px; border-radius: 12px; background: var(--soft); color: var(--muted); font-size: 14px !important; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager a { display: block; text-decoration: none; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-weight: 500; font-size: 15px; }
.pager a:hover { border-color: var(--accent); }
.pager small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.pager .r { text-align: right; }
.big404 { font-size: 96px; font-weight: 900; margin: 0; color: var(--accent); line-height: 1; }

/* footer */
.site-footer { margin-top: 72px; background: var(--surface); border-top: 1px solid var(--line); padding-top: 36px; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.foot a { display: block; text-decoration: none; color: var(--muted); padding: 2px 0; font-size: 14px; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot p { margin: 0 0 8px; }
.foot .muted { font-size: 13px; }
.foot-brand { font-weight: 900; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.foot-h { font-weight: 700; font-size: 14px; }
.copy { padding-top: 24px; padding-bottom: 32px; color: var(--muted); font-size: 12px; }

@media (max-width: 860px) {
  .cats, .grid { grid-template-columns: 1fr 1fr; }
}
/* 도표와 기출 데이터 상자 */
.fig { margin: 1.8em 0; }
.fig svg { display: block; width: 100%; height: auto; max-width: 640px; margin: 0 auto; }
.fig figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; line-height: 1.6; }
.fig .f-text { fill: var(--ink); font-size: 14px; }
.fig .f-small { fill: var(--muted); font-size: 12.5px; }
.fig .f-tiny { fill: var(--muted); font-size: 11.5px; }
.fig .f-strong { font-weight: 700; }
.fig .f-on { fill: #fff; font-weight: 700; }
.fig .f-bar { fill: var(--c, #4f46e5); }
.fig .f-track { fill: var(--soft); }
.fig .f-box { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.fig .f-warn { stroke: #e11d48; }
.fig .f-line { stroke: var(--ink); stroke-width: 2; fill: none; }
.fig .f-dash { stroke-dasharray: 5 4; }
.fig .f-rail { stroke: var(--muted); stroke-width: 3; }
.data-box { margin: 2.4em 0; padding: 22px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.data-box h2 { margin-top: 0; }
.data-box h3 { font-size: 17px; margin: 1.6em 0 0.6em; }
.data-box p { margin: 0 0 1em; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0 0 1.2em; }
.chips li { flex: 1 1 150px; background: var(--soft); border-radius: 12px; padding: 12px 14px; margin: 0; }
.chips li::marker { content: ""; }
.chips b { display: block; font-size: 24px; line-height: 1.3; color: var(--c, var(--ink)); }
.chips span { font-size: 13px; color: var(--muted); }
.data-box table, table.grade { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 1em; }
.data-box th, .data-box td, table.grade th, table.grade td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.data-box th, table.grade th { background: var(--soft); font-weight: 700; }
table.grade td:first-child { font-weight: 700; text-align: center; }
.data-box td:first-child { white-space: nowrap; }
.method { font-size: 13px !important; color: var(--muted); margin-bottom: 0 !important; }

@media (max-width: 680px) {
  .cats, .grid, .foot, .pager { grid-template-columns: 1fr; }
  .icon-btn.menu { display: inline-block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 12px; }
  .tools { margin-left: auto; }
  .hero-in { padding-top: 48px; padding-bottom: 40px; }
  .prose { font-size: 16.5px; }

  /* 모바일 화면 전용 최적화 */
  .post-visual { padding: 16px; gap: 14px; border-radius: 16px; }
  .post-visual-icon { width: 52px; height: 52px; font-size: 24px; border-radius: 14px; }
  .post-visual-info h3 { font-size: 16.5px; }
  .post-visual-info p { font-size: 13.5px; }

  .exam-section { padding: 18px 14px; border-radius: 18px; margin: 2em 0; }
  .exam-item { padding: 14px; border-radius: 14px; }
  .exam-question { font-size: 15.5px; }
  .exam-option-btn { padding: 10px 12px; font-size: 14px; }
  .exam-explanation-box { padding: 12px 14px; font-size: 14px; }
  .prose blockquote { padding: 14px 16px; border-radius: 0 12px 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
.prose h3 { font-size: 18px; font-weight: 800; margin: 1.6em 0 0.5em; line-height: 1.4; }
