/* ASCIISOFT WebEditor 매뉴얼 - 외부 글꼴/이미지 없음 (폐쇄망용) */
:root {
  --navy: #172948; --blue: #2e5392; --sky: #4f7cc8; --pale: #eef4fd; --pale2: #dfe9f9;
  --ink: #1f2733; --text: #333c4a; --mute: #6b7690; --line: #e1e7f0; --code-bg: #f3f7fd;
  --side: 272px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; color: var(--ink); background: #fff;
  font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", "Meiryo", "Yu Gothic", "Microsoft YaHei", "PingFang SC", "Microsoft JhengHei", "PingFang TC", sans-serif; }
code, pre { font-family: Consolas, "D2Coding", "Courier New", monospace; }
a { color: var(--blue); }

/* ----- 왼쪽 사이드바 (본문 B안) ----- */
.side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); display: flex; flex-direction: column;
  background: linear-gradient(#eef4fd, #dfe9f9); border-right: 1px solid #d6e2f5; z-index: 20; }
.side-head { padding: 26px 24px 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-size: 15px; letter-spacing: -.2px; }
.brand .lg { width: 40px; height: 40px; flex: none; }
.brand b { font-weight: 800; }
.side-ver { margin: 14px 0 0; font: 700 11px "Segoe UI", sans-serif; letter-spacing: 3px; color: #8a95ab; }
.side-ver b { color: var(--navy); letter-spacing: .5px; margin-left: 4px; }
.side-lang { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--mute); }
.side-lang select { flex: 1; height: 30px; padding: 0 8px; border: 1px solid #c9d7ee; background: #fff; color: var(--navy); font: inherit; font-size: 13px; }
.toc { flex: 1; overflow: auto; padding: 6px 14px 20px; }
.toc a { display: block; text-decoration: none; color: #4a5568; border-radius: 3px; }
.toc .c { display: flex; align-items: baseline; gap: 10px; padding: 9px 10px 5px; color: var(--navy); font-weight: 700; font-size: 14px; }
.toc .c i { font: 800 13px "Segoe UI", sans-serif; font-style: normal; color: var(--sky); width: 22px; flex: none; }
.toc .s { padding: 4px 10px 4px 42px; font-size: 13px; line-height: 1.4; }
.toc a:hover { background: rgba(46, 83, 146, .07); }
.toc a.on { color: var(--blue); background: rgba(46, 83, 146, .12); font-weight: 700; }
.side-foot { display: flex; align-items: center; gap: 6px; padding: 14px 24px 18px; font-size: 12px; color: #4a5568; border-top: 1px solid #d3dff3; }

/* ----- 본문 영역 ----- */
.main { margin-left: var(--side); min-width: 0; }

/* 표지 (커버 최종안) */
/* 커버 높이(--hh)는 화면 높이를 따르되 620~1000px. 우측 이미지는 화면 폭에 따라 커지지만,
   이미지 높이 대비 폭이 2.26배(약 1920px 화면 크기)를 넘으면 더 커지지 않아 4K 에서도 위쪽이 더 잘리지 않는다. */
.hero { --hh: clamp(620px, 100vh, 1000px); position: relative; overflow: hidden; height: var(--hh); background: linear-gradient(#fff, #f5f8fc); }
/* 그림 비율(794:763)과 같은 상자 + meet: 어떤 화면 크기에서도 위·아래가 잘리지 않음 */
.hero-box { position: absolute; right: 0; bottom: 0; height: calc(var(--hh) * .8); width: calc(var(--hh) * .8 * 1.0406); max-width: 100%; }
.hero-logo { position: absolute; left: 64px; top: 48px; }
.hero-logo .lg { width: 96px; height: 96px; display: block; }
.hero-ver { position: absolute; right: 56px; top: 64px; font: 700 12px "Segoe UI", sans-serif; letter-spacing: 3px; color: #8a95ab; }
.hero-ver b { font-size: 19px; color: var(--navy); letter-spacing: .3px; margin-left: 6px; }
.hero-text { position: absolute; left: 64px; top: 24%; }
.hero-k { font: 700 13px "Segoe UI", sans-serif; letter-spacing: 5px; color: var(--sky); }
.hero h1 { margin: 12px 0 0; font: 800 clamp(44px, 6vw, 72px)/1.02 "Segoe UI", sans-serif; letter-spacing: -1.5px; color: var(--navy); }
.hero h1 span { font-weight: 300; color: var(--blue); }
.hero-rule { width: 64px; height: 3px; background: var(--blue); margin: 22px 0 16px; }
.hero-sub { font-size: 21px; font-weight: 300; color: #3d4a63; }
.hero-foot { position: absolute; left: 64px; bottom: 48px; display: flex; flex-direction: column; gap: 4px; color: var(--navy); }
.hero-foot b { font: 700 13px "Segoe UI", sans-serif; letter-spacing: 3px; }
.hero-foot span { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: #4a5568; }

/* 장 */
.chap { max-width: 900px; padding: 72px 56px 24px; }
.chap-head { display: flex; align-items: flex-end; gap: 20px; padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.chap-no { font: 800 76px/.85 "Segoe UI", sans-serif; color: var(--blue); letter-spacing: -3px; }
.chap-k { font: 700 11px "Segoe UI", sans-serif; letter-spacing: 3px; color: var(--sky); margin-bottom: 6px; }
.chap-head h2 { margin: 0; font-size: 30px; letter-spacing: -.8px; color: var(--navy); }
.sec { padding-top: 26px; }
.sec h3 { margin: 0 0 12px; font-size: 18px; color: var(--navy); letter-spacing: -.3px; }
.sec h3 i { font-style: normal; color: var(--sky); margin-right: 8px; font-family: "Segoe UI", sans-serif; }
.sec p, .sec li { font-size: 14.5px; line-height: 1.8; color: var(--text); }
.sec p { margin: 0 0 12px; }
.sec ul { margin: 0 0 14px; padding-left: 20px; }
.sec code { background: var(--pale); color: var(--blue); padding: 1px 5px; border-radius: 3px; font-size: .9em; }
.steps { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 0 0 8px 34px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #dbe7fa; color: var(--blue); font: 700 12px/22px "Segoe UI", sans-serif; text-align: center; }
.codebox { position: relative; margin: 6px 0 16px; }
.sec pre { margin: 0; padding: 14px 18px; background: var(--code-bg); border: 1px solid #dce6f6; border-radius: 3px; color: #2b3a55;
  font-size: 13px; line-height: 1.65; overflow: auto; white-space: pre; }
.sec pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.copy { position: absolute; right: 8px; top: 8px; height: 26px; padding: 0 10px; border: 1px solid #c9d7ee; background: #fff; color: var(--blue);
  font: inherit; font-size: 12px; border-radius: 3px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.codebox:hover .copy, .copy:focus { opacity: 1; }
.sec table { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: 13.5px; }
.sec th { background: #e6eefb; color: var(--navy); text-align: left; padding: 9px 12px; border-bottom: 2px solid #a3bfec; }
.sec td { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--text); vertical-align: top; line-height: 1.6; }
.shot { margin: 8px 0 18px; border: 1px solid #dce4f1; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: 8px 14px; font-size: 12.5px; color: var(--mute); background: #f5f8fd; border-top: 1px solid #dce4f1; }

/* TIP / 주의 : 한눈에 알아보도록 아이콘 + 색 */
.tip, .warn { display: flex; gap: 14px; margin: 8px 0 16px; padding: 14px 18px; border-radius: 4px; }
.tip b, .warn b { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 22px; font-size: 12.5px; font-weight: 800; letter-spacing: .5px; }
.tip b::before, .warn b::before { content: ""; width: 18px; height: 18px; border-radius: 50%; color: #fff; font: 800 12px/18px "Segoe UI", sans-serif; text-align: center; }
.tip { background: #eef4fd; border-left: 4px solid var(--sky); }
.tip b { color: var(--blue); }
.tip b::before { content: "i"; background: var(--sky); }
.warn { background: #fdf4ea; border-left: 4px solid #e08a3c; }
.warn b { color: #b85d14; }
.warn b::before { content: "!"; background: #e08a3c; }
.tip p, .warn p { margin: 0 !important; font-size: 14px !important; }

.foot { max-width: 900px; padding: 40px 56px 60px; font-size: 12px; color: #8a95ab; }
.totop { position: fixed; right: 22px; bottom: 22px; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff;
  text-decoration: none; display: flex; align-items: center; justify-content: center; font-size: 18px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 15; }
.totop.show { opacity: .85; pointer-events: auto; }

/* ----- 모바일: 사이드바를 서랍으로 ----- */
.mbar, .scrim { display: none; }
@media (max-width: 900px) {
  .side { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 30px rgba(23, 41, 72, .2); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 26, 51, .3); z-index: 19; }
  .mbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; height: 52px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line); z-index: 10; color: var(--navy); font-size: 14px; }
  .menu-btn { width: 36px; height: 36px; border: 1px solid #d6e0ef; background: #fff; border-radius: 4px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 8px; cursor: pointer; }
  .menu-btn span { display: block; height: 2px; background: var(--navy); }
  .main { margin-left: 0; }
  .hero { --hh: clamp(520px, 80vh, 1000px); height: var(--hh); }
  .hero-logo { left: 20px; top: 24px; } .hero-logo .lg { width: 64px; height: 64px; }
  .hero-ver { right: 20px; top: 34px; }
  .hero-text { left: 20px; top: 22%; }
  .hero-foot { left: 20px; bottom: 28px; }
  .hero-box { height: calc(var(--hh) * .55); width: calc(var(--hh) * .55 * 1.0406); max-width: 100%; }
  .chap { padding: 48px 18px 12px; }
  .chap-no { font-size: 56px; }
  .chap-head h2 { font-size: 24px; }
  .foot { padding: 30px 18px 50px; }
  html { scroll-padding-top: 64px; }
}
