:root { color-scheme: light; font: 16px/1.65 system-ui, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif; color: #202c24; background: #f5f2eb; }
* { box-sizing: border-box; }
body { margin: 0; }
:focus-visible { outline: 3px solid #a3640d; outline-offset: 4px; }
a { color: #16553e; text-underline-offset: .18em; }
a:hover { color: #0a3524; }
.shell { width: min(calc(100% - 32px), 1020px); margin-inline: auto; }
.site-bar { border-bottom: 1px solid #ddd5c8; background: #fffdf7; }
.site-bar .shell, .site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-block: 14px; }
.site-bar a { font-weight: 750; text-decoration: none; }
.site-bar nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
main.shell { padding-block: clamp(22px, 5vw, 60px); }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
h1 { font-size: clamp(1.85rem, 5vw, 3rem); letter-spacing: -.04em; margin: 0 0 12px; }
h2 { font-size: 1.37rem; margin: 0 0 14px; }
h3 { font-size: 1.07rem; margin: 0; }
.lede { font-size: clamp(1rem, 2.2vw, 1.22rem); color: #4d6054; max-width: 64ch; margin: 0 0 25px; }
.crumbs { margin-bottom: 18px; color: #4d6054; font-size: .875rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 10px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: '/'; display: inline-block; margin-right: 10px; color: #716b5e; }
.kicker { color: #16553e; font-weight: 700; margin: 0 0 6px; }
main section + section, article + section, .tracks + section { margin-top: 26px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.cards li, .reading, figure { border: 1px solid #ded7c9; border-radius: 14px; background: #fffdf7; padding: 16px; }
.cards p, .reading p { margin: 8px 0 0; }
.cards small { display: block; margin-top: 8px; color: #4d6054; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 350px); gap: 20px; align-items: start; }
.exercise { margin-top: 14px !important; }
.play { display: inline-flex; padding: 8px 13px; margin-block: 12px; background: #16553e; color: #fff; border-radius: 8px; font-weight: 700; text-decoration: none; }
.play:hover { background: #0e3b2c; color: #fff; }
figure { margin: 0; }
.diagram { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); overflow: hidden; border: 1px solid #6d4e39; border-radius: 5px; }
.diagram > div { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.diagram img { width: 88%; height: 88%; }
.light { background: #e8dcc4; color: #503422; }
.dark { background: #825f43; color: #fff3dd; }
.rank, .file { position: absolute; font-size: clamp(.59rem, 1.5vw, .68rem); line-height: 1; font-weight: 700; }
.rank { top: 2px; left: 2px; }
.file { bottom: 2px; right: 2px; }
figcaption { margin-top: 8px; font-weight: 700; }
details { margin-top: 8px; }
summary { cursor: pointer; font-weight: 650; }
.sequence { font-weight: 700; }
.sequence + h3 { margin-top: 12px; }
.key-rules { margin-block: 28px; }
.key-rule { padding-block: 12px; border-top: 1px solid #ded7c9; }
.key-rule p { margin: 6px 0 0; }
.rule-source, .rule-scope { color: #4d6054; font-size: .9rem; }
.lesson-jump { margin-top: 0; }
.lesson-board { margin-top: 24px; scroll-margin-top: 16px; }
.lesson-frame { display: block; width: 100%; height: 520px; border: 1px solid #394c40; border-radius: 8px; background: #0b1a14; }
.lesson-board > p { margin: 8px 0 0; }
.site-footer { border-top: 1px solid #ddd5c8; font-size: .9rem; }
@media (max-width: 680px) { .lesson-grid { grid-template-columns: 1fr; } figure { width: min(100%, 350px); grid-row: 1; } }
@media (max-width: 650px) { .lesson-frame { height: 650px; } }

.topic-section + .topic-section { margin-top: 16px; }
.topic-section h3 { margin: 0 0 8px; }
.topic-section h3 small { margin-inline-start: 4px; color: #4d6054; font-size: .82rem; font-weight: 500; }
.level-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.level-links a { padding: 4px 14px; border: 1px solid #ded7c9; border-radius: 999px; background: #fffdf7; }
