:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #242a33;
  background: #ffffff;
  line-height: 1.7;
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }

body {
  max-width: 768px;
  margin: 0 auto;
  padding: 24px;
}

.lang-switch {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 2em;
}

.lang-switch select {
  width: 192px;
  min-width: 168px;
  max-width: 100%;
  padding: 9px 34px 9px 12px;
  border: 1px solid #c8c8c8;
  border-radius: 10px;
  font: inherit;
  color: #222222;
  background-color: #ffffff;
  color-scheme: light;
  cursor: pointer;
}

.lang-switch select:hover { border-color: #888888; }
.lang-switch select:focus,
.lang-switch select:focus-visible {
  outline: none;
  outline-offset: 0;
  box-shadow: none;
  border-color: #1a73e8;
}
.lang-switch label {
  flex-shrink: 0;
  color: #666666;
  font-size: 0.9em;
  white-space: nowrap;
}
.lang-panel { display: none; }
.lang-panel.active { display: block; }
h1 { font-size: 1.5em; line-height: 1.4; margin: 0 0 8px; }
h2 { font-size: 1.12em; line-height: 1.5; margin: 30px 0 10px; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 24px; }
li { margin-bottom: 8px; }
.meta { color: #5d6470; font-size: 0.9rem; margin-bottom: 24px; }
a { color: #315bae; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid #6a85c3; outline-offset: 4px; }

@media (max-width: 480px) {
  body { padding: 18px 16px 32px; }
  .lang-switch { justify-content: space-between; }
  .lang-switch select { width: min(210px, 66vw); min-width: 0; }
}

@media (prefers-color-scheme: dark) {
  :root { color: #e3e7ed; background: #171a20; }
  .meta { color: #abb3c1; }
  .lang-switch label { color: #abb3c1; }
  a { color: #a5bff6; }
}

@media print {
  :root { color: #111111; background: #ffffff; }
  body { max-width: none; padding: 0; }
  .lang-switch, noscript { display: none; }
  h2 { break-after: avoid; }
  a { color: inherit; }
}
