.history-layout { max-width: 1460px; margin: 12px auto 60px; padding: 0 44px; }
.history-page .article-title h1 { font-size: 29px; }
.history-page .article-title { align-items: baseline; }
.history-help, .history-legend { font-size: 14px; }
.history-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 18px; margin: 20px 0 14px; padding: 16px; border: 1px solid var(--subtle-line); background: var(--panel); font-size: 14px; }
.history-filter label { display: flex; flex-direction: column; gap: 4px; }
.history-filter input, .history-filter select { max-width: 100%; min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 2px; background: var(--background); }
.compare-button { font-weight: 600; background: var(--panel); font-size: 14px; }
.history-list { list-style: none; margin: 16px 0 22px; padding: 0; font-size: 14px; line-height: 1.9; }
.history-list li { padding: 2px 6px; overflow-wrap: anywhere; }
.history-list li:has(input:checked) { background: var(--hover); outline: 1px solid var(--subtle-line); }
.history-list li:target { outline: 2px solid var(--accent); }
.history-compare { white-space: nowrap; }
.history-compare input { accent-color: var(--accent); margin-inline: 2px; vertical-align: middle; }
.history-list b { font-weight: 500; }
.history-date { font-variant-numeric: tabular-nums; }
.history-size { color: var(--muted); font-variant-numeric: tabular-nums; }
.history-delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.history-summary { font-style: italic; }
.history-paging { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0; font-size: 13px; }
.history-paging label { margin-inline-start: auto; }
.history-paging select { margin-inline-start: 6px; padding: 3px; }
.positive { color: #006400; }
.negative { color: #b32424; }
[data-theme="dark"] .positive { color: #85d093; }
[data-theme="dark"] .negative { color: #ff9c9c; }
.minor-edit { font-weight: 700; }
.revision-return { margin-block: 14px 20px !important; font-size: 14px; }
.history-page .article .revision-return a[href], .history-page .article .revision-diff a[href] { padding-inline-start: 0; background-image: none; }
.old-revision-note { border: 1px solid var(--line); background: var(--panel); padding: 16px; margin-bottom: 28px; font-size: 14px; }
.old-revision-note p { margin: 6px 0 0; }
.revision-content { display: flow-root; }
.revision-content img { max-width: 100%; height: auto; }
.revision-content button, .revision-content input, .revision-content select,
.revision-content .gallery-controls, .revision-content .plate-controls, .revision-content .fuel-controls { display: none; }
.diff-scroll { max-width: 100%; overflow-x: auto; }
.revision-diff { width: 100%; border-spacing: 5px 3px; table-layout: fixed; font-size: 14px; line-height: 1.6; }
.revision-diff th { padding: 12px; vertical-align: top; font-weight: 600; background: var(--panel); }
.revision-diff small { display: block; margin-top: 6px; font-weight: 400; }
.revision-diff td { padding: 9px 12px; vertical-align: top; overflow-wrap: anywhere; white-space: pre-wrap; }
.diff-equal td { background: var(--panel); color: var(--muted); }
.diff-change td:first-child { border: 1px solid #e8c76d; background: #fff8dc; }
.diff-change td:last-child { border: 1px solid #8bb8e8; background: #eaf3ff; }
.revision-diff del, .revision-diff ins { font-weight: 600; text-decoration: none; }
.revision-diff del { background: #ffe49c; }
.revision-diff ins { background: #a3d3ff; }
.diff-context { text-align: center; color: var(--muted); font-size: 12px; }
[data-theme="dark"] .diff-change td:first-child { background: #332b19; border-color: #8d7437; }
[data-theme="dark"] .diff-change td:last-child { background: #152c42; border-color: #3b709b; }
[data-theme="dark"] .revision-diff del { background: #755c17; }
[data-theme="dark"] .revision-diff ins { background: #245580; }
.history-error { padding: 12px; border: 1px solid #b32424; }
@media (max-width: 700px) {
  .history-layout { padding-inline: 16px; }
  .history-page .article-title h1 { font-size: 25px; overflow-wrap: anywhere; }
  .history-filter { padding: 12px; gap: 10px; }
  .history-filter input { width: 100%; font-size: 16px; }
  .history-filter label { flex: 1 1 110px; min-width: 0; }
  .history-filter select { font-size: 16px; }
  .history-list { font-size: 13px; }
  .history-compare { display: inline-block; }
  .history-compare input { width: 17px; height: 17px; margin-inline: 4px; }
  .revision-diff { font-size: 13px; border-spacing: 2px; }
  .revision-diff th, .revision-diff td { padding: 7px; }
}
@media print { .history-filter, .compare-button, .history-compare input { display: none; } }
