/* GeNTY 아카데미 본문·도해 스타일 — 클래스는 모두 ac- 접두어(젠티 매니저 CSS와 겹치지 않게). 색은 CSS 변수로 두고 없으면 아래 기본값.
   매니저가 이 파일을 그대로 복사해 쓸 수 있다: 바꿀 것은 맨 위 변수 값뿐(어두운 배경에서도 본문 글자는 var(--ac-text), 도해는 항상 밝은 종이 바탕).
   본문 노드 → DOM 규칙은 academy-render.js(콘솔)와 계약 문서(console_manager_academy_contract.md) 참고. */
.ac-body {
  --ac-text: var(--text-1, #1b1f23); --ac-muted: var(--text-2, #5b6470); --ac-border: var(--border, #d9dee5); --ac-card: var(--glass, rgba(255,255,255,.6));
  --ac-soft: var(--glass-strong, rgba(120,130,150,.12)); --ac-accent: var(--accent, #4f7cff); --ac-danger: var(--danger, #d9480f); --ac-danger-fg: var(--danger-fg, var(--ac-danger)); --ac-link: var(--info-fg, var(--ac-accent)); --ac-accent-strong: var(--accent-strong, var(--ac-accent)); --ac-danger-bg: var(--danger-bg, rgba(217,72,15,.1));
  --ac-radius: var(--radius-md, 10px);
  color: var(--ac-text); font-size: 15px; line-height: 1.75; overflow-wrap: anywhere;
}
.ac-body h2 { font-size: 24px; font-weight: 700; margin: 40px 0 14px; }
.ac-body h3 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; margin: 40px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--ac-border); }
.ac-body > h3:first-child { margin-top: 8px; }
.ac-body h4 { font-size: 16px; font-weight: 650; margin: 26px 0 10px; }
.ac-body p { margin: 0 0 16px; }
.ac-body ul, .ac-body ol { margin: 0 0 18px; padding-left: 22px; line-height: 1.7; }
.ac-body li { margin-bottom: 6px; }
.ac-body b, .ac-body strong { font-weight: 650; }
.ac-body blockquote { margin: 0 0 16px; padding-left: 14px; border-left: 3px solid var(--ac-border); color: var(--ac-muted); }
.ac-body code { font-family: ui-monospace, monospace; font-size: .92em; background: var(--ac-soft); padding: 1px 5px; border-radius: 4px; }
.ac-body hr { border: 0; border-top: 1px solid var(--ac-border); margin: 24px 0; }
.ac-xref { color: var(--ac-link); text-decoration: none; border-bottom: 1px dotted currentColor; cursor: pointer; }
.ac-xref:hover { border-bottom-style: solid; }
/* 표 — 렌더러가 table을 ac-tw 상자로 감싼다(가로 스크롤) */
.ac-tw { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--ac-border); border-radius: var(--ac-radius); }
.ac-tw table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 540px; }
.ac-tw th { text-align: left; font-weight: 600; color: var(--ac-muted); padding: 9px 12px; border-bottom: 1px solid var(--ac-border); white-space: nowrap; background: var(--ac-soft); }
.ac-tw td { padding: 10px 12px; border-bottom: 1px solid var(--ac-border); vertical-align: top; line-height: 1.55; }
.ac-tw tr:last-child td { border-bottom: 0; }
.ac-tw td:first-child { font-weight: 550; white-space: nowrap; }
/* 상자류 */
.ac-callout { position: relative; border: 1px solid var(--ac-border); border-radius: var(--ac-radius); padding: 14px 16px 14px 44px; margin: 0 0 20px; font-size: 14px; line-height: 1.65; background: var(--ac-card); }
.ac-callout > .ac-ico { position: absolute; left: 16px; top: 16px; }
.ac-callout b:first-of-type { display: block; margin-bottom: 2px; }
.ac-callout.ac-warn { color: var(--ac-danger-fg); border-color: color-mix(in srgb, var(--ac-danger) 35%, var(--ac-border)); background: var(--ac-danger-bg); }
.ac-callout.ac-warn b { color: var(--ac-danger-fg); }
.ac-script { border-left: 2px solid var(--ac-border); padding: 2px 0 2px 20px; margin: 0 0 20px; font-size: 14.5px; line-height: 1.75; }
.ac-script > b:first-child { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ac-muted); margin-bottom: 4px; }
.ac-sum { border: 1px solid var(--ac-border); border-radius: 14px; padding: 20px; margin: 36px 0 8px; background: var(--ac-soft); }
.ac-sum > b:first-child { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; }
.ac-sum ul { margin: 10px 0 0; padding-left: 20px; font-size: 14px; }
.ac-sum li { margin-bottom: 5px; }
.ac-body .ac-note { font-size: 13px; color: var(--ac-muted); }
.ac-flow { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 4px 0 20px; }
.ac-flow > div { border: 1px solid var(--ac-border); border-radius: var(--ac-radius); padding: 12px 14px; font-size: 13px; color: var(--ac-muted); background: var(--ac-card); line-height: 1.5; }
.ac-flow span { display: inline-flex; width: 22px; height: 22px; border-radius: 6px; background: var(--ac-accent-strong); color: #fff; font-size: 12px; font-weight: 650; align-items: center; justify-content: center; margin-bottom: 8px; }
.ac-flow b { display: block; color: var(--ac-text); font-size: 14px; font-weight: 650; }
.ac-flow em { display: inline-flex; font-style: normal; font-size: 11px; font-weight: 500; border: 1px solid var(--ac-border); border-radius: 5px; padding: 0 6px; margin: 4px 0 6px; color: var(--ac-text); }
.ac-ico { display: inline-flex; width: 16px; height: 16px; flex: none; }
.ac-ico::before { content: ''; width: 100%; height: 100%; background-color: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
/* 도해 — 항상 밝은 종이 바탕(그림 색이 밝은 배경 기준으로 그려져 있음) */
.ac-dg { margin: 8px 0 28px; border: 1px solid var(--ac-border); border-radius: 14px; overflow: hidden; background: var(--ac-card); }
.ac-dg-svg { background: #faf9f7; padding: 12px; }
.ac-dg-svg svg { width: 100%; height: auto; display: block; }
.ac-dg-m { display: none; }
@media (max-width: 640px) { .ac-dg-svg.ac-has-m .ac-dg-full { display: none; } .ac-dg-svg.ac-has-m .ac-dg-m { display: block; } .ac-dg-m svg + svg { margin-top: 8px; } }
.ac-dg figcaption { padding: 12px 16px; font-size: 13px; color: var(--ac-muted); border-top: 1px solid var(--ac-border); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ac-dg figcaption b { color: var(--ac-text); font-weight: 650; }
.ac-dg-legend { list-style: none; padding: 12px 16px 16px; margin: 0; border-top: 1px solid var(--ac-border); display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 18px; }
.ac-dg-legend li { display: flex; gap: 8px; font-size: 13px; color: var(--ac-muted); line-height: 1.45; margin: 0; }
.ac-dg-legend b { color: var(--ac-text); font-weight: 650; }
.ac-dg-n { flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 5px; background: #1e3f37; color: #fff; font-size: 11px; font-weight: 650; display: flex; align-items: center; justify-content: center; font-family: ui-monospace, monospace; }
.ac-dg-n.ac-alt { background: #b3201f; }
.ac-dg-n.ac-blu { background: #2f5fb3; }
.ac-dg-n.ac-wrn { background: #b45309; }
/* 도해 안 글자·선 (SVG class) */
.ac-dg-lbl { font: 700 15px 'Pretendard Variable', Pretendard, sans-serif; fill: #20241f; }
.ac-dg-big { font-size: 18px; }
.ac-dg-sub { font: 500 13px 'Pretendard Variable', Pretendard, sans-serif; fill: #5c6158; }
.ac-dg-strong { font-weight: 700; fill: #20241f; }
.ac-dg-side { font: 700 14px 'Pretendard Variable', Pretendard, sans-serif; fill: #20241f; letter-spacing: .1em; }
.ac-dg-lead { stroke: #1e3f37; stroke-width: 1.3; }
.ac-dg-anchor { fill: #fff; stroke: #1e3f37; stroke-width: 1.5; }
.ac-dg-mk circle { fill: #1e3f37; stroke: #fff; stroke-width: 2; }
.ac-dg-mk text { fill: #fff; font: 700 13px 'Pretendard Variable', Pretendard, sans-serif; }
.ac-dg-mk.ac-alt circle { fill: #b3201f; }
.ac-dg-mk.ac-blu circle { fill: #2f5fb3; }
.ac-dg-warn { font: 700 13px 'Pretendard Variable', Pretendard, sans-serif; fill: #b3201f; }
.ac-dg-br { stroke: #5c6158; fill: none; stroke-width: 1.5; }
.ac-dg-br2 { stroke: #2f5d52; fill: none; stroke-width: 2; }
.ac-dg-acc { font: 700 14px 'Pretendard Variable', Pretendard, sans-serif; fill: #2f5d52; }
.ac-dg-tag rect { fill: rgba(255,253,249,.88); }
.ac-dg-tag text { font: 700 12px 'Pretendard Variable', Pretendard, sans-serif; fill: #5c3a2c; }
