* {
    box-sizing: border-box;
}

body {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    font: 16px/1.65 Arial, sans-serif;
    color: #252525;
    background: #fff;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
}

header > a {
    font-size: 22px;
    font-weight: bold;
    color: #252525;
}

nav {
    display: flex;
    gap: 20px;
}

a {
    color: #245c96;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a.new {
    color: #ba3333;
}

h1, h2, h3, h4 {
    line-height: 1.3;
    font-weight: normal;
}

h1, h2 {
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 24px;
}

main {
    min-height: 70vh;
    overflow-wrap: break-word;
}

img {
    max-width: 100%;
    height: auto;
}

table {
    border-collapse: collapse;
    max-width: 100%;
}

.wikitable th,
.wikitable td {
    border: 1px solid #ccc;
    padding: 6px 12px;
}

.wikitable th {
    background: #eee;
}

pre {
    background: #f5f5f5;
    padding: 16px;
    overflow: auto;
}

#toc, .toc {
    display: table;
    border: 1px solid #ddd;
    padding: 12px 24px;
    background: #f8f8f8;
}

#toc ul, .toc ul {
    list-style: none;
    padding-left: 20px;
}

.thumb {
    display: block;
    margin: 12px;
    padding: 5px;
    border: 1px solid #ddd;
    background: #f8f8f8;
    max-width: 100%;
}

.thumb > a {
    display: block;
}

.thumb img {
    display: block;
}

.thumb iframe {
    display: block;
    max-width: 100%;
    border: 0;
}

.thumb:has(> div > iframe) {
    width: auto;
}

.thumb figcaption {
    font-size: 13px;
    line-height: 1.4;
    padding: 4px 0 0;
}

.thumb figcaption p {
    margin: 0;
}

.tright, .floatright {
    float: right;
    margin-left: 20px;
}

.tleft, .floatleft {
    float: left;
    margin-right: 20px;
}

.editsection,
.mw-editsection,
.toctoggle {
    display: none;
}

.article-list {
    columns: 2;
    column-gap: 32px;
}

.article-list li {
    padding: 3px 0;
    break-inside: avoid;
}

article p {
    margin: 0 0 1em;
}

article::after {
    content: "";
    display: block;
    clear: both;
}

.footnote-ref {
    font-size: 0.85em;
    vertical-align: super;
    line-height: 0;
}

.footnote {
    font-size: 0.9em;
    margin-top: 2em;
}

.footnote ol {
    padding-left: 1.5em;
}

.footnote li {
    margin: 0.4em 0;
}

footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #ddd;
    color: #888;
    font-size: 13px;
}

@media (max-width: 600px) {
    body {
        padding: 0 16px;
    }

    .article-list {
        columns: 1;
    }

    .tright, .tleft,
    .floatright, .floatleft {
        float: none;
        margin: 12px 0;
    }
}

a:not([href]) {
    color: inherit;
    text-decoration: none;
    cursor: inherit;
}
