:root {
  --bg: #ffffff;
  --surface: #f4f3fb;
  --text: #17161f;
  --muted: #5b5a6b;
  --brand: #3c3489;
  --link: #3c3489;
  --border: #dedcee;
  --mark-bg: #fff3b0;
  --mod-bg: #e3ecfb;
  --mod-text: #0b4f8a;
  --warn-bg: #fff1d6;
  --warn-text: #7a4b00;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121214;
    --surface: #1c1c24;
    --text: #f2f2f6;
    --muted: #b4b3c4;
    --brand: #9a8fe0;
    --link: #b3a9f0;
    --border: #34334a;
    --mark-bg: #5a4d00;
    --mod-bg: #1d3350;
    --mod-text: #a9cdf5;
    --warn-bg: #4a3500;
    --warn-text: #ffd98a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 16px; }
header.site .wrap { display: flex; align-items: center; gap: 12px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
header.site a.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
header.site img { width: 36px; height: 36px; border-radius: 9px; }
header.site nav { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; font-size: 15px; }
main { padding-top: 28px; padding-bottom: 48px; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 8px; text-wrap: balance; color: var(--brand); }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 2.2rem 0 .5rem; text-wrap: balance; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 .4rem; }
p, ul, ol { margin: 0 0 1rem; }
ul { padding-left: 1.3rem; }
li { margin-bottom: .35rem; }
.meta { color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2rem; border: 1px solid var(--border); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--border); }
th { background: var(--surface); font-weight: 650; }
tr:last-child td { border-bottom: 0; }
.mod { background: var(--mod-bg); color: var(--mod-text); font-weight: 700; font-size: .8em; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
mark { background: var(--mark-bg); color: inherit; padding: 0 3px; border-radius: 3px; }
.draft { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-text); border-radius: 8px; padding: 10px 14px; margin-bottom: 1.5rem; font-size: .95rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin: 0 0 1.2rem; }
.card h2, .card h3 { margin-top: 0; }
.btn { display: inline-block; background: var(--brand); color: var(--bg); text-decoration: none; font-weight: 650; padding: 12px 20px; border-radius: 10px; }
.btn:hover { filter: brightness(1.1); }
.links { list-style: none; padding: 0; display: grid; gap: 10px; }
.links li { margin: 0; }
.links a { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; font-weight: 600; background: var(--surface); }
.links small { display: block; font-weight: 400; color: var(--muted); }
footer.site { border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; padding: 18px 0 28px; }
footer.site .wrap { display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 480px) { body { font-size: 16px; } h1 { font-size: 1.6rem; } }
