* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.8;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 40px 20px;
}
.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 60px 60px 80px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border-radius: 8px;
}
a { color: #667eea; }
a:hover { color: #764ba2; }
.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-family: Arial, sans-serif;
    font-size: 0.9em;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 30px;
}
.site-nav a { text-decoration: none; font-weight: 600; }
.site-nav a[aria-current="page"] { color: #2c3e50; }
.breadcrumb {
    font-family: Arial, sans-serif;
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 20px;
}
.article-header {
    border-bottom: 4px solid #2c3e50;
    padding-bottom: 30px;
    margin-bottom: 40px;
}
h1 {
    font-size: 2.6em;
    line-height: 1.2;
    letter-spacing: -1px;
    color: #1a1a1a;
    margin-bottom: 20px;
}
.byline { color: #555; font-style: italic; }
article h2 {
    font-size: 1.6em;
    line-height: 1.3;
    color: #2c3e50;
    margin: 45px 0 15px;
}
article h3 {
    font-size: 1.25em;
    color: #2c3e50;
    margin: 30px 0 10px;
}
article p, article li { font-size: 1.1em; margin-bottom: 18px; }
article ul, article ol { padding-left: 1.4em; margin-bottom: 18px; }
article li { margin-bottom: 10px; }
code {
    font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: #f8f9fa;
    padding: 1px 5px;
    border-radius: 3px;
}
.note-list { list-style: none; }
.part {
    margin-bottom: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-left: 5px solid #667eea;
    border-radius: 5px;
}
.part h2 { font-size: 1.4em; line-height: 1.35; margin-bottom: 10px; }
.part h2 a { color: #2c3e50; text-decoration: none; }
.part h2 a:hover { color: #667eea; }
.part p { color: #555; font-size: 1.05em; }
footer {
    margin-top: 70px;
    padding-top: 40px;
    border-top: 2px solid #ecf0f1;
    text-align: center;
    color: #7f8c8d;
}
footer a { color: #667eea; text-decoration: none; font-weight: 600; }
footer a:hover { text-decoration: underline; }
.built-by {
    text-align: left;
    background: #f8f9fa;
    border-left: 5px solid #764ba2;
    border-radius: 5px;
    padding: 24px 28px;
    margin-bottom: 30px;
    font-size: 0.95em;
    line-height: 1.7;
}
.built-by p { margin-bottom: 10px; }
.built-by-title {
    font-family: Arial, sans-serif;
    font-size: 0.8em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2c3e50;
    font-weight: 700;
}
a:focus-visible { outline: 3px solid #764ba2; outline-offset: 2px; }
@media (max-width: 768px) {
    body { padding: 16px; }
    .container { padding: 32px 22px; }
    h1 { font-size: 1.9em; }
    article h2 { font-size: 1.35em; }
}

/* Infographics: each SVG fills the column, and its inline min-width keeps the
   smallest label at 12px or more (viewBox width x 12 / smallest font-size). On
   a phone the figure scrolls sideways instead of shrinking the text; the page
   itself never scrolls sideways. scripts/check-notes.mjs enforces the rule. */
article figure { margin: 1.5rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
article figure svg { display: block; width: 100%; max-width: none; height: auto; }
article figcaption { font-size: 0.85rem; opacity: 0.8; margin-top: 0.5rem; }
article pre { overflow-x: auto; max-width: 100%; }
article code { overflow-wrap: anywhere; }

/* Building blocks for the reference notes (tables, comparisons, callouts, code, definitions). */
.table-wrap { overflow-x: auto; margin: 0 0 22px; }
article table { border-collapse: collapse; width: 100%; font-family: Arial, sans-serif; font-size: 0.95em; }
article th, article td { border-bottom: 1px solid #dfe3e8; padding: 9px 10px; text-align: left; vertical-align: top; }
article th { background: #f3f4fb; color: #1a1a1a; }
article td.num, article th.num { text-align: right; font-variant-numeric: tabular-nums; }
article blockquote { border-left: 4px solid #764ba2; padding: 6px 0 6px 20px; margin: 0 0 22px; color: #3d4852; font-style: italic; }
article pre { background: #1f2430; color: #e6e6e6; padding: 16px 18px; border-radius: 6px; margin: 0 0 22px; font-size: 0.85em; line-height: 1.55; }
article pre code { background: none; padding: 0; color: inherit; }
.callout { background: #f6f3ff; border: 1px solid #ddd3fb; border-radius: 6px; padding: 18px 20px; margin: 0 0 24px; }
.callout p:last-child { margin-bottom: 0; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 24px; }
.compare > div { background: #f8f9fa; border-radius: 6px; padding: 16px 18px; }
.compare h3 { margin-top: 0; }
article dl { margin: 0 0 22px; }
article dt { font-weight: bold; margin-top: 12px; }
article dd { margin: 4px 0 10px 1.2em; font-size: 1.05em; }
article details { border: 1px solid #e3e6ea; border-radius: 6px; padding: 12px 16px; margin: 0 0 14px; }
article summary { cursor: pointer; font-weight: bold; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }
