html { color-scheme: light; }
.reading-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.reading-toolbar .back { margin-bottom: 0; }
.theme-toggle { font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #333; background: #f4f4f4; border: 1px solid #ccc; border-radius: 4px; padding: 10px 14px; min-height: 44px; cursor: pointer; }
.theme-toggle:hover { background: #e0e0e0; }
.theme-toggle:focus-visible { outline: 2px solid #1766b3; outline-offset: 3px; }
html[data-theme="dark"] { color-scheme: dark; background: #181a1b; }
html[data-theme="dark"] body { background: #181a1b; color: #e4e1dc; }
html[data-theme="dark"] a { color: #9dc9fa; }
html[data-theme="dark"] a:visited { color: #c6b4ec; }
html[data-theme="dark"] h4,
html[data-theme="dark"] blockquote { color: #d0ccc6; }
html[data-theme="dark"] .meta,
html[data-theme="dark"] .back,
html[data-theme="dark"] .note { color: #b5b2ad; }
html[data-theme="dark"] .back:hover { color: #fff; }
html[data-theme="dark"] h2,
html[data-theme="dark"] blockquote,
html[data-theme="dark"] .pagination,
html[data-theme="dark"] th,
html[data-theme="dark"] td { border-color: #45494c; }
html[data-theme="dark"] .thesis,
html[data-theme="dark"] th { background: #242729; }
html[data-theme="dark"] .pagination a,
html[data-theme="dark"] .theme-toggle { background: #2b2f32; color: #e4e1dc; border-color: #62686c; }
html[data-theme="dark"] .pagination a:hover,
html[data-theme="dark"] .theme-toggle:hover { background: #3a4044; }
html[data-theme="dark"] .theme-toggle:focus-visible { outline-color: #9dc9fa; }
@media print {
  html[data-theme], html[data-theme] body { color-scheme: light; background: #fff; color: #222; }
  html[data-theme] body * { color: inherit !important; background: transparent !important; border-color: #ccc !important; }
  .theme-toggle { display: none; }
}
