:root {
    --page-bg: #f5f7fb; --surface: #fff; --line: rgba(148,163,184,.24);
    --text: #111827; --muted: #64748b; --blue: #2563eb; --green: #059669;
    --navy: #020617; --soft-blue: #eff6ff; --soft-green: #ecfdf5;
    --radius: 18px; --small-radius: 10px; --sidebar: 256px;
    --shadow: 0 18px 45px rgba(15,23,42,.08);
    --s1: 8px; --s2: 12px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 40px; --s7: 48px; --s8: 64px;
}
* { box-sizing: border-box; }
html { scroll-snap-type: y proximity; }
body { margin: 0; color: var(--text); font-family: 'Noto Sans KR', sans-serif; font-size: 16px; line-height: 1.65; background: linear-gradient(rgba(37,99,235,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(37,99,235,.035) 1px,transparent 1px),linear-gradient(180deg,#f8fafc,var(--page-bg)); background-size: 32px 32px,32px 32px,auto; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; white-space: nowrap; }
a { color: var(--blue); text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.material-symbols-outlined { font-family: 'Material Symbols Outlined', sans-serif; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; display: inline-block; white-space: nowrap; direction: ltr; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; }
.course-shell { display: flex; align-items: flex-start; }
#main { flex: 1; min-width: 0; outline: none; }
#desktop-sidebar { flex: 0 0 var(--sidebar); width: var(--sidebar); height: 100dvh; position: sticky; top: 0; display: flex; flex-direction: column; background: rgba(255,255,255,.94); border-right: 1px solid var(--line); box-shadow: 8px 0 30px rgba(15,23,42,.04); z-index: 50; }
.sidebar-top { padding: var(--s4); border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s1); }
.sidebar-heading { min-width: 0; }
.sidebar-heading a { font-size: 20px; font-weight: 900; line-height: 1.25; color: var(--text); text-decoration: none; white-space: nowrap; }
.sidebar-heading a span { color: var(--blue); }
.sidebar-heading p { font-size: 12px; color: var(--muted); margin: var(--s1) 0 0; white-space: nowrap; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; flex-shrink: 0; width: 44px; height: 44px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: var(--small-radius); }
.icon-button:hover { color: var(--blue); background: var(--soft-blue); }
.icon-button:active { transform: translateY(1px); }
.icon-button:disabled { opacity: .3; cursor: default; }
#sidebar-toggle { width: 32px; min-height: 44px; margin-right: -8px; }
#course-nav { flex: 1; overflow-y: auto; padding: var(--s2); scrollbar-width: thin; }
.nav-heading { font-size: 12px; font-weight: 700; color: var(--muted); margin: var(--s1) var(--s2); white-space: nowrap; }
.appendix-heading { margin-top: var(--s4); }
.nav-link { min-height: 44px; display: flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s2); color: #475569; border-radius: 8px; border: 1px solid transparent; text-decoration: none; font-size: 13px; white-space: nowrap; }
.nav-link:hover { background: #f8fafc; color: var(--blue); }
.nav-link[aria-current="step"] { background: var(--soft-blue); color: var(--blue); border-color: rgba(37,99,235,.12); font-weight: 700; }
.nav-number { width: 20px; flex-shrink: 0; font: 12px monospace; opacity: .65; }
.nav-link .material-symbols-outlined { font-size: 18px; }
.nav-text { overflow: hidden; text-overflow: ellipsis; }
.sidebar-bottom { padding: var(--s3); border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.sidebar-bottom p { margin: 0 0 var(--s1); }
.sidebar-bottom a { display: inline-flex; min-height: 36px; align-items: center; gap: var(--s1); text-decoration: none; font-weight: 700; white-space: nowrap; }
#desktop-sidebar.collapsed { --sidebar: 88px; }
.collapsed .sidebar-heading, .collapsed .nav-heading, .collapsed .nav-text, .collapsed .sidebar-bottom { display: none; }
.collapsed .sidebar-top { padding: var(--s3); justify-content: center; }
.collapsed .nav-link { justify-content: center; padding: var(--s1); gap: 4px; }
.slide-container { min-height: 100dvh; padding: var(--s6); display: flex; align-items: center; scroll-snap-align: start; }
.slide-card { width: 100%; max-width: 1152px; min-width: 0; min-height: min(calc((100vw - var(--sidebar) - 80px) * .59375), 684px); margin: auto; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.slide-content { padding: var(--s6) var(--s7) var(--s4); flex: 1; min-width: 0; }
.slide-meta { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); margin-bottom: var(--s4); color: var(--blue); }
.slide-badge { background: var(--soft-blue); border-radius: var(--small-radius); font-size: 11px; font-weight: 800; letter-spacing: .1em; padding: 4px var(--s2); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3, p, li { word-break: keep-all; overflow-wrap: anywhere; }
h1 { font-size: clamp(40px,4vw,60px); font-weight: 900; line-height: 1.2; }
h2 { font-size: clamp(28px,2.6vw,42px); line-height: 1.25; font-weight: 900; margin-bottom: var(--s4); }
h3 { font-size: 20px; line-height: 1.45; font-weight: 800; margin-bottom: var(--s1); }
.lead { font-size: 17px; color: #475569; line-height: 1.7; margin-bottom: var(--s4); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.chips span { padding: var(--s1) var(--s3); border: 1px solid var(--line); border-radius: var(--small-radius); font-weight: 700; }
.cover .slide-card { background: radial-gradient(circle at top left,rgba(37,99,235,.3),transparent 42%),radial-gradient(circle at bottom right,rgba(16,185,129,.18),transparent 35%),var(--navy); color: white; border-color: #1e293b; }
.cover .slide-content { display: flex; flex-direction: column; justify-content: center; padding: var(--s8); }
.cover .slide-badge { background: transparent; padding: 0; color: #93c5fd; letter-spacing: .25em; }
.cover .slide-meta { margin-bottom: var(--s5); }
.cover .lead { margin-top: var(--s4); color: #e2e8f0; font-size: 22px; }
.cover .chips span { background: rgba(255,255,255,.08); }
.cover .note { color: #cbd5e1; }
.cover .slide-footer { border-color: rgba(255,255,255,.1); color: #94a3b8; }
.cover .action-link { background: rgba(255,255,255,.12); color: white; border-color: rgba(255,255,255,.2); }
.info-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.info-grid.count-2, .info-grid.count-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.info-card { background: var(--soft-blue); border: 1px solid var(--line); border-radius: var(--small-radius); padding: var(--s4); min-width: 0; }
.info-card:nth-child(even) { background: #f8fafc; }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 800; margin-bottom: var(--s1); }
.info-card > p:last-child { color: #475569; font-size: 14px; line-height: 1.7; }
.steps { list-style: none; counter-reset: step; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s2); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: var(--s2); font-size: 16px; line-height: 1.65; }
.steps li::before { content: counter(step,decimal-leading-zero); color: var(--blue); font-size: 12px; font-weight: 800; padding-top: 4px; }
.image-grid { display: grid; grid-template-columns: 1fr; gap: var(--s3); margin-bottom: var(--s4); }
.image-grid.count-2 { grid-template-columns: minmax(0,.8fr) minmax(0,1.5fr); }
.image-grid figure { border: 1px solid var(--line); border-radius: var(--small-radius); background: #f8fafc; padding: var(--s2); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.image-grid figure a { display: flex; align-items: center; justify-content: center; min-height: 120px; flex: 1; }
.image-grid img { display: block; max-width: 100%; max-height: 230px; object-fit: contain; height: auto; }
.image-frame { display: inline-block; position: relative; max-width: 100%; line-height: 0; }
.click-target { position: absolute; border: 2px solid #dc2626; border-radius: 3px; pointer-events: none; }
.click-target b { position: absolute; top: -12px; left: -9px; min-width: 17px; height: 17px; padding: 0 3px; display: flex; align-items: center; justify-content: center; background: #dc2626; color: white; border-radius: 4px; font: 700 10px/1 sans-serif; white-space: nowrap; }
.click-target.verify { border-style: dashed; }
figcaption { margin-top: var(--s1); font-size: 12px; color: #475569; line-height: 1.6; }
figcaption span { color: var(--muted); }
.action-links { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.action-link { display: inline-flex; justify-content: center; align-items: center; gap: var(--s2); min-height: 44px; padding: var(--s1) var(--s3); border: 1px solid var(--line); border-radius: var(--small-radius); background: var(--soft-blue); color: #1d4ed8; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.action-link:hover { background: #dbeafe; color: #1e40af; }
.note { margin-top: var(--s3); color: var(--muted); font-size: 12px; line-height: 1.8; }
.completion { display: flex; gap: var(--s2); align-items: flex-start; margin-top: var(--s4); padding: var(--s3); background: var(--soft-green); border-radius: var(--small-radius); color: #065f46; font-size: 13px; }
.completion .material-symbols-outlined { flex: 0 0 auto; font-size: 20px; margin-top: 2px; }
.completion strong { margin-right: var(--s1); }
.table-scroll { overflow-x: auto; margin-top: var(--s3); }
table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
th, td { padding: 10px var(--s2); border-bottom: 1px solid var(--line); vertical-align: top; word-break: keep-all; }
thead { background: var(--soft-blue); color: #1e40af; }
tbody th { font-weight: 700; }
tbody tr:nth-child(even) { background: #f8fafc; }
.prompt-panel { margin: var(--s4) 0; border-radius: var(--small-radius); background: #0f172a; color: #f1f5f9; overflow: hidden; }
.prompt-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s1); padding: var(--s2) var(--s4); background: rgba(255,255,255,.04); color: #93c5fd; font-size: 13px; font-weight: 700; }
.copy-button { display: inline-flex; align-items: center; gap: var(--s1); min-height: 44px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 6px var(--s2); background: rgba(255,255,255,.08); color: white; font-size: 12px; }
.copy-button:hover { background: rgba(255,255,255,.18); }
.copy-button:disabled { opacity: .65; cursor: wait; }
.copy-button .material-symbols-outlined { font-size: 16px; }
pre { font-family: inherit; font-size: 14px; line-height: 1.85; margin: 0; padding: var(--s4); white-space: pre-wrap; overflow-wrap: anywhere; word-break: keep-all; }
.benchmark .slide-content { padding: var(--s4); }
.benchmark h2 { font-size: 28px; margin-bottom: var(--s2); }
.benchmark .lead { font-size: 14px; margin-bottom: var(--s3); }
.benchmark-image { display: block; }
.benchmark-image img { width: 100%; height: auto; max-height: calc(100dvh - 330px); object-fit: contain; display: block; border: 1px solid var(--line); }
.benchmark-details { margin-top: var(--s3); font-size: 13px; }
.benchmark-details summary { cursor: pointer; color: var(--blue); padding: var(--s2) 0; min-height: 44px; }
.benchmark-details table { min-width: 620px; }
.slide-footer { display: flex; justify-content: space-between; gap: var(--s3); border-top: 1px solid var(--line); padding: var(--s2) var(--s4); color: var(--muted); font-size: 11px; }
.slide-controls { position: fixed; bottom: 12px; right: 16px; display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--small-radius); padding: 2px; box-shadow: var(--shadow); z-index: 40; }
#slide-position { min-width: 64px; text-align: center; font-size: 12px; color: #475569; }
#status-message { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #0f172a; color: white; padding: var(--s2) var(--s4); border-radius: var(--small-radius); font-size: 14px; z-index: 100; max-width: calc(100vw - 32px); }
#status-message:empty { display: none; }
#mobile-menu, #menu-backdrop { display: none; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: var(--s2); background: white; z-index: 200; }
.skip-link:focus { top: 12px; }
@media (max-width: 1279px) {
    .slide-content { padding: var(--s5); }
    .cover .slide-content { padding: var(--s7); }
    .info-card { padding: var(--s3); }
    .info-grid.count-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1023px) {
    html { scroll-snap-type: none; }
    #desktop-sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px,84vw); height: 100dvh; display: none; }
    #desktop-sidebar.mobile-open { display: flex; }
    #desktop-sidebar.collapsed { --sidebar: 256px; }
    #desktop-sidebar.collapsed .sidebar-heading, #desktop-sidebar.collapsed .nav-heading, #desktop-sidebar.collapsed .nav-text, #desktop-sidebar.collapsed .sidebar-bottom { display: block; }
    #desktop-sidebar.collapsed .nav-link { justify-content: flex-start; gap: var(--s2); padding: var(--s1) var(--s2); }
    #mobile-menu { position: fixed; top: 12px; left: 12px; display: inline-flex; background: white; box-shadow: var(--shadow); border-color: var(--line); z-index: 45; }
    #menu-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; width: 100%; height: 100%; background: rgba(15,23,42,.4); border: 0; z-index: 49; }
    body.menu-open { overflow: hidden; }
    .slide-container { padding: 68px var(--s3) var(--s8); min-height: 100dvh; }
    .slide-card { aspect-ratio: auto; min-height: calc(100dvh - 132px); }
    .benchmark-image img { max-height: none; }
    h1 { font-size: 40px; }
    h2 { font-size: 32px; }
    .info-grid.count-3 { grid-template-columns: 1fr; }
    .slide-controls { right: 12px; bottom: 8px; }
}
@media (max-width: 599px) {
    .slide-content, .cover .slide-content, .benchmark .slide-content { padding: 24px 20px; }
    h1 { font-size: 34px; }
    h2, .benchmark h2 { font-size: 27px; }
    h3 { font-size: 19px; }
    .cover .lead { font-size: 18px; }
    .lead, .steps li { font-size: 15px; }
    .info-grid, .info-grid.count-2, .info-grid.count-4, .image-grid.count-2 { grid-template-columns: 1fr; }
    .prompt-heading { padding: var(--s2) var(--s3); }
    pre { padding: var(--s3); font-size: 13px; }
    .slide-meta { margin-bottom: var(--s3); }
    .slide-footer { padding: var(--s2) var(--s3); font-size: 10px; }
    .action-link { padding: var(--s1) var(--s2); font-size: 12px; }
    th, td { padding: var(--s1); font-size: 12px; }
    .benchmark .action-links { gap: var(--s1); }
    .benchmark .note { font-size: 11px; }
    .chips { gap: var(--s1); margin-top: var(--s4); }
    .chips span { font-size: 13px; padding: var(--s1) var(--s2); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
