:root {
    color-scheme: light;
    --ink: #25262c;
    --muted: #626570;
    --paper: #fff;
    --rail: #f4f5f7;
    --line: #dfe1e7;
    --brand: #4a48b3;
    --brand-wash: #eaeaf7;
    --focus: #087f83;
    --header-height: 72px;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 20; padding: 12px 18px; background: white; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 10; background: #09090b; color: #fafafa; border-bottom: 1px solid #29292e; }
.header-inner { max-width: 1500px; min-height: var(--header-height); margin: auto; padding: 12px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header a { color: inherit; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 650; }
.brand img { flex: none; }
.guide-home { font-size: 15px; font-weight: 650; }
.guide-home span { margin-left: 10px; padding-left: 14px; border-left: 1px solid #52525b; color: #b7b7c0; font-weight: 400; }
.guide-layout { display: grid; grid-template-columns: 252px minmax(0, 1fr) 224px; max-width: 1500px; min-height: calc(100vh - var(--header-height)); margin: auto; }
.chapter-sidebar { background: var(--rail); border-right: 1px solid var(--line); }
.sidebar-inner { position: sticky; top: var(--header-height); max-height: calc(100vh - var(--header-height)); overflow-y: auto; padding: 32px 20px; }
.nav-label { margin: 0 12px 16px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.chapter-navigation ol, .contents-navigation ul { list-style: none; margin: 0; padding: 0; }
.chapter-navigation li { margin: 3px 0; }
.chapter-navigation a { display: block; padding: 10px 12px; border-left: 3px solid transparent; color: var(--muted); font-size: 14px; line-height: 1.45; text-decoration: none; }
.chapter-navigation a:hover { color: var(--ink); background: #e9ebef; }
.chapter-navigation [aria-current="page"] { border-color: var(--brand); background: var(--brand-wash); color: var(--brand); font-weight: 650; }
.back-to-site { display: block; margin: 28px 12px 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-decoration: none; }
.reading-column { min-width: 0; width: 100%; max-width: 790px; justify-self: center; padding: 36px 48px 32px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; margin-bottom: 26px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.article-meta p { margin: 0; }
main { font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.8; overflow-wrap: anywhere; }
main h1, main h2, main h3, main h4 { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #18191e; line-height: 1.25; font-weight: 650; scroll-margin-top: calc(var(--header-height) + 24px); }
main h1 { margin: 0 0 28px; font-size: 34px; }
main h2 { margin: 48px 0 18px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 24px; }
main h3 { margin: 32px 0 14px; font-size: 19px; }
main h4 { margin: 28px 0 12px; font-size: 18px; }
main p { margin: 0 0 22px; }
main strong { font-weight: 700; }
main ul, main ol { margin: 0 0 24px; padding-left: 24px; }
main li { padding-left: 5px; margin-bottom: 10px; }
main li > p { margin-bottom: 12px; }
main hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
main > hr:last-child { display: none; }
main blockquote { margin: 24px 0; padding-left: 20px; border-left: 3px solid var(--brand); color: var(--muted); }
main code { font-size: 0.9em; }
main pre { overflow-x: auto; padding: 16px; background: var(--rail); }
main img { max-width: 100%; height: auto; }
.table-scroll { max-width: 100%; margin: 28px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
table { width: 100%; min-width: 520px; border-collapse: collapse; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 14px; line-height: 1.65; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--rail); color: #393c48; font-size: 13px; font-weight: 650; }
th + th, td + td { border-left: 1px solid var(--line); }
tbody tr:nth-child(even) { background: #fafafb; }
tbody tr:last-child td { border-bottom: 0; }
.contents-sidebar { border-left: 1px solid var(--line); }
.contents-sidebar .sidebar-inner { padding: 36px 16px; }
.contents-navigation a { display: block; padding: 7px 12px; color: var(--muted); font-size: 12px; line-height: 1.5; text-decoration: none; }
.contents-navigation a:hover { color: var(--brand); text-decoration: underline; }
.contents-h3 a, .contents-h4 a { padding-left: 24px; font-size: 11px; }
.mobile-chapters, .mobile-contents { display: none; }
.article-footer { margin-top: 44px; }
.adjacent-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.chapter-link { display: flex; flex-direction: column; gap: 8px; min-height: 96px; padding: 20px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }
.chapter-link span { color: var(--muted); font-size: 12px; }
.chapter-link strong { font-weight: 650; }
.chapter-link.next { grid-column: 2; text-align: right; }
.article-footer > p { margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

@media (max-width: 1199px) {
    .guide-layout { grid-template-columns: 236px minmax(0, 1fr); max-width: 1100px; }
    .contents-sidebar { display: none; }
    .mobile-contents { display: block; margin-bottom: 28px; border-block: 1px solid var(--line); }
    summary { padding: 14px 0; cursor: pointer; color: var(--ink); font-size: 14px; font-weight: 600; }
    .mobile-contents .contents-navigation { padding: 0 0 14px; }
    .reading-column { padding-inline: 36px; }
}

@media (max-width: 799px) {
    :root { --header-height: 64px; }
    .header-inner { padding: 12px 20px; gap: 16px; }
    .brand { font-size: 14px; gap: 8px; }
    .brand img { width: 28px; height: 28px; }
    .guide-home { font-size: 13px; }
    .guide-home span { display: none; }
    .guide-layout { display: block; }
    .chapter-sidebar { display: none; }
    .reading-column { max-width: 760px; margin: auto; padding: 20px 24px 28px; }
    .mobile-chapters { display: block; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
    .mobile-chapters summary { padding-top: 0; }
    .mobile-chapters summary span { margin-left: 10px; color: var(--muted); font-size: 12px; font-weight: 400; }
    .mobile-chapters .chapter-navigation { padding-bottom: 16px; }
    .article-meta { margin-bottom: 22px; }
    main { font-size: 17px; line-height: 1.75; }
    main h1 { font-size: 28px; }
    main h2 { font-size: 22px; margin-top: 36px; }
    main h3 { font-size: 18px; }
    th, td { padding: 12px; }
    .adjacent-navigation { gap: 20px; }
}

@media (max-width: 380px) {
    .header-inner { padding-inline: 16px; }
    .brand { font-size: 13px; }
    .reading-column { padding-inline: 18px; }
    .mobile-chapters summary span { display: block; margin: 8px 0 0 18px; }
}

@media print {
    .site-header, .chapter-sidebar, .contents-sidebar, .mobile-chapters, .mobile-contents, .skip-link, .adjacent-navigation { display: none; }
    .guide-layout { display: block; }
    .reading-column { padding: 0; }
    main { font-size: 11pt; }
    main h1 { font-size: 22pt; }
    main h2 { font-size: 16pt; }
    main h1, main h2, main h3 { break-after: avoid; }
    tr { break-inside: avoid; }
    .table-scroll { overflow: visible; }
    table { min-width: 0; font-size: 9pt; }
}