/* 사이트 공통(머리 메뉴·꼬리말)과 글 쪽. 연습 화면 스타일(style.css) 다음에 읽는다. */
.sitebar { background: var(--ink); }
.sitebar nav { max-width: 1360px; margin: 0 auto; padding: 0 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; min-height: 44px; }
.sitebar a { color: #dfe5ee; text-decoration: none; font-size: 14px; padding: 10px 0; }
.sitebar a:hover { color: #fff; }
.sitebar a[aria-current="page"], .sitebar .pages a[aria-current="true"] { color: #fff; font-weight: 700; box-shadow: inset 0 -2px #fff; }
/* 본문으로 건너뛰기: 초점이 올 때만 왼쪽 위에 */
.sitebar .skip { position: absolute; left: 8px; top: -60px; z-index: 30; background: #fff; color: var(--ink); font-weight: 700; padding: 10px 14px; border-radius: 4px; }
.sitebar .skip:focus { top: 8px; }
.sitebar .home { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #fff; margin-right: 6px; } /* 홈: 사이트 아이콘 + '홈'(2026-11-26 사용자 — 사이트 이름 대신) */
.sitebar .home img { display: block; border-radius: 5px; }
/* 시험 고르기(시험이 둘 이상일 때, scripts/pages.mjs): 지금 시험은 흰 바탕 */
.sitebar .exams { display: flex; flex-wrap: wrap; gap: 4px; margin-right: 6px; }
.sitebar .exams a { padding: 4px 10px; border: 1px solid #5d6878; border-radius: 999px; }
.sitebar .exams a[aria-current] { background: #fff; color: var(--ink); font-weight: 700; }
.sitebar .exams small { font-size: 12px; opacity: 0.8; }
/* 그 시험의 쪽(치수 연습·뺄길이 퀴즈·계산법…)은 시험 단추 줄 아래 줄에(2026-11-26 사용자). 휴대폰은 시험 단추도 '홈' 다음 줄(2026-11-25 사용자) */
.sitebar .pages { display: flex; flex-wrap: wrap; gap: 0 14px; }
.sitebar .exams + .pages { flex-basis: 100%; border-top: 1px solid #364152; }
@media (max-width: 599px) { .sitebar .exams { flex-basis: 100%; } }
.sitefoot { max-width: 1360px; margin: 24px auto 0; padding: 16px 16px 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.sitefoot nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 6px; }
.sitefoot a { color: var(--mute); }
.sitefoot a[aria-current="page"] { color: var(--ink); font-weight: 700; } /* 지금 쪽(꼬리말에만 있는 쪽은 머리 메뉴에 표시가 없다) */
@media (max-width: 599px) { .sitefoot nav { gap: 0 14px; } .sitefoot nav a { display: inline-block; padding: 10px 0; } } /* 휴대폰: 누르는 자리 40px 남짓 */
.sitefoot p { margin: 4px 0; }

/* 글 쪽 */
.article { max-width: 760px; }
main.article, .landing main { display: block; } /* style.css 의 넓은 화면 두 단 배치는 연습 화면에만 */
header.article { padding-top: 18px; }
.article h1 { font-size: 24px; line-height: 1.35; }
.article .lead { font-size: 16px; color: var(--ink); margin-top: 8px; }
.article section { padding: 16px; }
.article h2 { font-size: 19px; margin: 0 0 10px; }
.article h3 { font-size: 16px; margin: 18px 0 6px; }
.article p, .article li { font-size: 15.5px; line-height: 1.75; }
.article ul, .article ol { padding-left: 22px; }
.article table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 14.5px; }
.article th, .article td { border: 1px solid var(--line); padding: 6px 8px; text-align: center; }
.article thead th { background: var(--paper); }
.article tbody th { font-weight: 400; } /* 줄 머리(scope="row") — 낭독기용, 모양은 보통 칸과 같게 */
.article .wide { overflow-x: auto; }
.article .calc li { font-variant-numeric: tabular-nums; }
.article dt { font-weight: 700; margin-top: 12px; }
.article dd { margin: 2px 0 0; line-height: 1.7; }
.article .go { font-weight: 700; color: var(--blue); }
.article .checks { padding-left: 0; } /* 준비물 체크 목록은 들여쓰지 않는다 */
.note-warn { padding: 8px 12px; border-left: 3px solid var(--orange); background: color-mix(in srgb, var(--orange) 10%, transparent); }
/* 사용자가 고쳐 쓸 초안 자리. 공개 전에 모두 없앤다(사용자 글로 바꾸거나 지운다). */
.draft { margin: 12px 0; padding: 10px 12px; border: 2px dashed var(--orange); border-radius: 8px; background: #fff8ec; font-size: 14.5px; }
.draft::before { content: "초안 — 확인 전"; display: block; font-weight: 700; color: var(--orange); font-size: 12.5px; margin-bottom: 4px; }
.article .cards, .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 0; list-style: none; }
.cards li { margin: 0; }
.cards a { display: block; height: 100%; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
.cards a:hover { border-color: var(--blue); }
.cards b { display: block; font-size: 16px; margin-bottom: 4px; color: var(--blue); }
.cards span { font-size: 14px; color: var(--mute); line-height: 1.6; }
.article .toc, .toc { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-size: 14px; }
/* 합격 요령 세 쪽(tips·tips-work·tips-day) 사이 고르기와 다음 쪽 링크(2026-11-26 사용자: 한 쪽이 너무 길다) */
.parts { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.parts a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid #b8c0cb; border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-size: 14.5px; }
.parts a:hover { border-color: var(--ink); }
.parts a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.article .next { margin: 8px 0 0; text-align: right; font-size: 16px; font-weight: 700; }
.article .next a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); }
@media print { .sitebar, .sitefoot, .toc, .parts, .next { display: none !important; } } /* 목차 단추 줄은 화면용(.article .toc 의 flex 를 이긴다) */

/* 첫 화면(랜딩). 밝은 바탕 하나, 강조색은 --blue 하나, 모서리 12px. */
.landing main, .landing .hero { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.landing section { background: none; border: 0; border-radius: 0; padding: 0; margin: 0 0 72px; }
.landing h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.3; margin: 0 0 12px; letter-spacing: -0.01em; }
.landing :where(.hero, main) p { font-size: 16px; line-height: 1.75; max-width: 62ch; }
.hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; padding-top: 48px !important; padding-bottom: 64px !important; }
.hero h1 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero p { font-size: 17px; color: var(--mute); margin: 0 0 24px; }
.hero .free { font-size: 14px; margin: 12px 0 0; }
.hero .slogan { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; line-height: 1.35; color: var(--ink); margin: 0 0 12px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid #b8c0cb; background: var(--card); color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; transition: transform .15s ease, border-color .15s ease; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #1747b5; }
.hero-shot, .frame { margin: 0; }
.hero-shot img, .frame img { display: block; width: 100%; height: auto; border-radius: 12px; object-fit: cover; }
/* 3D 화면 위쪽의 시점 단추 줄은 잘라 낸다 */
.hero-shot img, .frame.dark img { aspect-ratio: 1110 / 850; object-position: bottom; box-shadow: 0 18px 40px rgb(27 35 48 / .18); }
.frame.paper img { aspect-ratio: 1390 / 970; object-position: bottom; border: 1px solid var(--line); background: #fff; }
figcaption { margin-top: 10px; font-size: 14px; color: var(--mute); line-height: 1.6; }
.pair-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; margin-top: 20px; }
.flow ol { list-style: none; counter-reset: f; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.flow li { counter-increment: f; padding: 16px 16px 0 0; }
.flow li b { display: block; font-size: 19px; margin-bottom: 6px; }
.flow li b::before { content: counter(f) " "; color: var(--blue); }
.flow li span { color: var(--mute); font-size: 15px; line-height: 1.65; }
.shapes { padding: 32px !important; background: var(--card) !important; border: 1px solid var(--line) !important; border-radius: 12px !important; }
.shapes h3 { margin: 22px 0 0; font-size: 17px; }
.shape-pick { display: grid; grid-template-columns: repeat(auto-fill, 72px); gap: 8px; margin-top: 12px; }
.shape-pick a { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; border: 1px solid #b8c0cb; color: var(--ink); text-decoration: none; font-size: 22px; font-weight: 700; transition: transform .15s ease, background .15s ease; }
.shape-pick a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
/* 시험 준비 쪽 목록: 한 줄에 쪽 하나 — 왼쪽 이름·설명, 오른쪽 시험 링크(2026-11-26 사용자: 색 칸 섞인 카드 대신) */
.prep ul { list-style: none; padding: 0; margin: 20px 0 0; border-top: 2px solid var(--ink); }
.prep li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 32px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.prep b { display: block; font-size: 18px; margin-bottom: 4px; }
.prep span { font-size: 15px; color: var(--mute); line-height: 1.6; }
.landing .prep .to { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 18px; margin: 0; font-size: 15px; }
.prep .to a { display: inline-flex; align-items: center; min-height: 40px; color: var(--blue); font-weight: 600; text-underline-offset: 3px; }
/* 세 시험 한눈에(첫 화면 표): 휴대폰도 세 시험이 한 화면에 들어오게 긴 이름은 <wbr> 에서 접고 글자를 줄인다 */
.compare .wide { overflow-x: auto; margin-top: 20px; border-top: 2px solid var(--ink); }
.compare table { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 12px 12px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); line-height: 1.5; }
.compare thead th { font-size: 16px; }
.compare tbody th { color: var(--mute); font-weight: 600; white-space: nowrap; }
@media (max-width: 599px) { .compare table { font-size: 13.5px; } .compare th, .compare td { padding: 10px 8px 10px 0; } .compare thead th { font-size: 14px; } .compare tbody th { white-space: normal; } }
.landing .note { font-size: 14.5px; color: var(--mute); margin-top: 14px; }
.scope { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.scope > div { border-left: 3px solid var(--blue); padding-left: 18px; }
.scope > div + div { border-left-color: var(--mute); }
.scope h2 { font-size: 21px; }
@media (max-width: 860px) {
  .hero, .pair-grid, .scope { grid-template-columns: 1fr; }
  .hero { gap: 28px; padding-top: 28px !important; }
  .flow ol { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .prep li { grid-template-columns: 1fr; }
  .landing .prep .to { justify-content: flex-start; }
  .shape-pick { grid-template-columns: repeat(5, minmax(0, 72px)); }
  .landing section { margin-bottom: 52px; }
}
@media (max-width: 480px) {
  .flow ol { grid-template-columns: 1fr; }
  .shapes { padding: 20px !important; }
}

/* 사진 한 장, 도형 그림 */
.photo-one img { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--paper); }
.diagram { margin: 14px 0 10px; }
.diagram svg { display: block; width: 100%; max-width: 720px; height: auto; }
.diagram figcaption ol { margin: 0; padding-left: 1.4em; }
.diagram figcaption .warn { margin: 2px 0 0; color: var(--red); font-weight: 700; }
.diagram svg[tabindex] { cursor: zoom-in; }
/* 그림 크게 보기(web/figzoom.mjs): 화면을 다 덮고, 끌어서 옮기고 두 손가락·휠로 확대한다. */
.figbig { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 8px; border: 0; background: #fff; }
.figbig[open] { display: flex; flex-direction: column; gap: 6px; }
.figbig button { align-self: flex-end; }
.figbig svg { flex: 1; min-height: 0; width: 100%; touch-action: none; cursor: grab; }
.photo-one { max-width: 360px; margin: 0 0 12px; }
@media print { .photo-one { display: none; } }
/* 준비물 도구 사진: 항목 오른쪽에 작게(2026-11-26 사용자 — 위키미디어 공용 사진, 없는 것은 AI 그림 표시). 출처는 쪽 끝 '사진 출처' */
.checks li.pic { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: start; }
.checks li.pic label, .checks li.pic .why { grid-column: 1; }
.checks .toolpic { grid-column: 2; grid-row: 1 / span 2; position: relative; }
.checks .toolpic img { display: block; width: 120px; height: 90px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.checks .toolpic small { position: absolute; left: 4px; bottom: 4px; padding: 1px 5px; border-radius: 4px; background: rgb(27 35 48 / .78); color: #fff; font-size: 10.5px; line-height: 1.4; }
@media (max-width: 599px) { .checks .toolpic img { width: 96px; height: 72px; } }
.article .credits { font-size: 13.5px; color: var(--mute); }
.article .credits li { font-size: 13.5px; line-height: 1.6; }
@media print { .checks .toolpic { display: none; } }
