* { box-sizing: border-box; }
body { margin: 0; background: #f8fafc; color: #1e293b; font-family: Inter, sans-serif; font-size: 13px; }
.workspace { max-width: 1440px; margin: 0 auto; padding: 32px 28px 60px; }
.header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.eyebrow { color: #047857; text-transform: uppercase; font-size: 11px; font-weight: 800; letter-spacing: .1em; margin: 0 0 6px; }
h1, h2, h3, p { margin: 0; }
h1 { color: #0f172a; font-size: 30px; letter-spacing: -.03em; }
h2 { color: #0f172a; font-size: 17px; }
h3 { color: #0f172a; font-size: 14px; }
.intro { margin-top: 7px; color: #64748b; line-height: 1.55; max-width: 900px; }
.count { flex: 0 0 auto; border-radius: 999px; background: #ecfdf5; color: #047857; padding: 7px 11px; font-size: 11px; font-weight: 800; }
.panel { background: white; border: 1px solid #e2e8f0; border-radius: 16px; padding: 20px; margin-top: 14px; box-shadow: 0 1px 3px #0f172a0d; }
.notice-panel { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 24px; align-items: center; background: #f0fdf4; border-color: #a7f3d0; }
.notice-panel p { margin-top: 7px; color: #475569; line-height: 1.6; }
.notice { padding: 13px; border-radius: 10px; background: white; border: 1px solid #d1fae5; color: #065f46; line-height: 1.55; }
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; }
.contents { position: sticky; top: 16px; }
.contents h2 { margin-bottom: 10px; }
.contents ol { margin: 0; padding-left: 20px; color: #047857; }
.contents li { padding: 4px 0; }
.contents a { color: #334155; text-decoration: none; font-weight: 600; line-height: 1.4; }
.contents a:hover { color: #047857; text-decoration: underline; }
.chapters { min-width: 0; }
.chapter { scroll-margin-top: 16px; }
.chapter-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.chapter-number { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #ecfdf5; color: #047857; font: 800 12px 'JetBrains Mono', monospace; }
.chapter-heading p { margin-top: 4px; color: #64748b; line-height: 1.5; }
.chapter p { color: #475569; line-height: 1.65; margin-top: 9px; }
.chapter h3 { margin-top: 17px; }
.chapter h3 + p { margin-top: 6px; }
.chapter ul { margin: 10px 0; padding-left: 20px; color: #475569; line-height: 1.65; }
.chapter li + li { margin-top: 7px; }
.formula { overflow-x: auto; margin: 10px 0; padding: 11px 13px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; color: #0f172a; font: 600 12px/1.7 'JetBrains Mono', monospace; white-space: normal; }
.formula code, code.inline { color: #065f46; font: 600 12px 'JetBrains Mono', monospace; }
.formula code { display: block; }
.inline { display: inline-block; padding: 1px 4px; border-radius: 4px; background: #f1f5f9; }
.definitions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.definition { padding: 10px 12px; border-radius: 9px; background: #f8fafc; border: 1px solid #e2e8f0; color: #475569; line-height: 1.5; }
.definition strong { color: #0f172a; }
.formula-list { display: grid; gap: 9px; margin-top: 12px; }
.formula-card { padding: 13px 14px; border: 1px solid #e2e8f0; border-radius: 11px; background: #fff; }
.formula-card h3 { margin: 0; }
.formula-card p { margin-top: 5px; }
.formula-card .formula { margin: 7px 0 0; }
.table-wrap { overflow-x: auto; margin-top: 11px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 9px 10px; border-bottom: 1px solid #cbd5e1; color: #475569; font-size: 11px; }
td { padding: 9px 10px; vertical-align: top; border-bottom: 1px solid #f1f5f9; color: #475569; line-height: 1.5; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { color: #0f172a; font-weight: 700; }
.tag { display: inline-block; padding: 3px 7px; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: 10px; font-weight: 800; }
.caution { margin-top: 12px; padding: 11px 13px; border-left: 3px solid #f59e0b; border-radius: 0 9px 9px 0; background: #fffbeb; color: #78350f; line-height: 1.55; }
.footnote { margin-top: 18px; color: #64748b; font-size: 11px; line-height: 1.6; }
@media (max-width: 900px) {
    .workspace { padding: 22px 16px 40px; }
    .layout { grid-template-columns: 1fr; }
    .contents { position: static; }
    .contents ol { columns: 2; column-gap: 28px; }
    .notice-panel { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
    .workspace { padding: 16px 12px 30px; }
    .header { align-items: flex-start; flex-direction: column; gap: 12px; }
    h1 { font-size: 25px; }
    .panel { padding: 15px; }
    .definitions { grid-template-columns: 1fr; }
    .contents ol { columns: 1; }
}
