* { box-sizing: border-box; }
body {
margin: 0;
font-family: -apple-system, Helvetica, Arial, sans-serif;
color: #2a2e3a;
line-height: 1.6;
}
/* fixed navbar on the left edge (test 21) */
#navbar {
position: fixed;
top: 0;
left: 0;
width: 280px;
height: 100%;
border-right: 2px solid #e2e5ec;
background: #f6f7fa;
padding: 20px;
overflow-y: auto;
}
#navbar header {
font-size: 1.4rem;
font-weight: 700;
margin-bottom: 16px;
}
.nav-link {
display: block;
padding: 8px 0;
color: #3a5a8a;
text-decoration: none;
border-top: 1px solid #e2e5ec;
}
/* main content sits to the right of the fixed navbar */
#main-doc {
margin-left: 300px;
padding: 24px 32px;
max-width: 800px;
}
.main-section header {
font-size: 1.6rem;
margin-top: 28px;
}
code {
display: block;
background: #f3f4f7;
padding: 8px 12px;
border-radius: 4px;
font-family: Menlo, Consolas, monospace;
margin: 8px 0;
}
/* media query (test 22): stack navbar on top for small screens */
@media (max-width: 768px) {
#navbar {
position: static;
width: 100%;
height: auto;
border-right: none;
border-bottom: 2px solid #e2e5ec;
}
#main-doc {
margin-left: 0;
}
}