body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    background: #f4f4f4;
    margin: 0;
    padding: 20px;
    color: #222;
    line-height: 1.7;
}

.container {
    background: #fff;
    max-width: 880px;
    margin: 0 auto;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
}

h1 {
    font-size: 1.6em;
    margin-top: 0;
    border-bottom: 2px solid #007aff;
    padding-bottom: 8px;
}

h2 {
    font-size: 1.3em;
    margin-top: 2em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}

h3 {
    font-size: 1.05em;
    margin-top: 1.6em;
    color: #333;
}

p {
    margin: 0.9em 0;
}

ul, ol {
    padding-left: 1.5em;
}

ul li, ol li {
    margin: 0.3em 0;
}

a {
    color: #007aff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    font-family: ui-monospace, "SF Mono", Menlo, Monaco, "Courier New", monospace;
    background: #f0f0f0;
    color: #c7254e;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.9em;
    word-break: break-word;
}

pre {
    background: #1e1e1e;
    color: #f0f0f0;
    padding: 14px 16px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.85em;
    line-height: 1.5;
    margin: 12px 0;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
    border-radius: 0;
}

pre.ascii-art {
    background: #fafafa;
    color: #333;
    border: 1px solid #e0e0e0;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
    font-size: 0.95em;
}

th, td {
    border: 1px solid #ddd;
    padding: 6px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f0f0f0;
    font-weight: bold;
}

td code {
    white-space: nowrap;
}

.lead {
    color: #555;
    font-size: 1.02em;
    margin-bottom: 1.5em;
}

.navigation-links {
    margin-bottom: 12px;
    font-size: 0.9em;
}

details.toc {
    background: #f7f7f7;
    border-radius: 6px;
    padding: 8px 14px;
    margin: 16px 0 24px;
}

details.toc summary {
    cursor: pointer;
    font-weight: bold;
}

details.toc ol {
    margin: 8px 0 0;
    line-height: 1.7;
}

details.toc ol ol {
    list-style: lower-alpha;
    margin: 0;
}

.callout {
    border-left: 4px solid #007aff;
    background: #f0f7ff;
    padding: 8px 14px;
    margin: 12px 0;
    border-radius: 0 6px 6px 0;
}

.callout-warn {
    border-left-color: #ff9500;
    background: #fff7ec;
}

.callout strong {
    color: #005bbf;
}

.callout-warn strong {
    color: #b35900;
}

ul.checklist {
    list-style: none;
    padding-left: 0;
}

ul.checklist li {
    margin: 0.5em 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

ul.checklist input[type="checkbox"] {
    margin: 0.35em 0 0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #007aff;
}

ul.checklist label {
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

ul.checklist input[type="checkbox"]:checked + label {
    color: #999;
    text-decoration: line-through;
}

ul.checklist input[type="checkbox"]:checked + label code,
ul.checklist input[type="checkbox"]:checked + label strong {
    color: inherit;
}

ul.checklist .nested {
    width: 100%;
    margin: 0.4em 0 0 24px;
    padding-left: 0;
}

.progress-bar {
    background: #f0f7ff;
    border: 1px solid #cfe3ff;
    border-radius: 6px;
    padding: 10px 16px;
    margin: 16px 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
    position: sticky;
    top: 8px;
    z-index: 10;
}

.progress-bar .count {
    font-weight: bold;
    color: #007aff;
    margin-left: 4px;
}

.btn-reset {
    background: #fff;
    border: 1px solid #cfe3ff;
    border-radius: 4px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 0.85em;
    color: #007aff;
    font-family: inherit;
}

.btn-reset:hover {
    background: #e8f1ff;
}
