:root {
  color-scheme: light;
  --bg:#f7f7f4; --paper:#fff; --ink:#20231f; --soft:#595f58;
  --line:#d8dbd2; --accent:#78531b; --tint:#f3e7cb;
  font: 16px/1.55 "Instrument Sans",system-ui,"Microsoft YaHei",sans-serif;
}
:root.dark {
  color-scheme:dark;
  --bg:#171a18; --paper:#202422; --ink:#f1f2ec; --soft:#b9c1b8;
  --line:#3c423c; --accent:#f4c779; --tint:#423a27;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--bg); color:var(--ink); }
h1,h2,h3,p { margin:0; }
a { color:inherit; text-decoration:none; }
button,input,textarea,select { color:inherit; font:inherit; }
button,summary { cursor:pointer; }
[hidden] { display:none!important; }
:focus-visible { outline:3px solid #cb923d; outline-offset:3px; }
header,main,footer { width:min(1216px,92%); margin:auto; }
header,nav,.header-tools,footer,.heading { display:flex; align-items:center; gap:24px; }
header { min-height:68px; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:7px; font-size:22px; font-weight:800; letter-spacing:-.05em; }
.brand b { padding:1px 7px; background:var(--ink); color:var(--bg); transform:skew(-7deg); }
nav { font-size:14px; margin-left:24px; font-weight:650; }
.header-tools,header > a:last-child:not(:first-child) { margin-left:auto; }
.header-tools { gap:12px; }
.support-link,.action { display:inline-block; background:var(--ink); color:var(--bg); border:0; border-radius:6px; font-weight:650; padding:9px 14px; }
#theme { border:1px solid var(--line); border-radius:50%; width:36px; height:36px; background:var(--paper); }
main > section,main > aside { scroll-margin:16px; margin-bottom:40px; }
.heading { justify-content:space-between; margin-bottom:16px; }
h2 { font-size:clamp(22px,3vw,31px); letter-spacing:-.045em; }
input,textarea,select { width:100%; padding:10px 13px; border:1px solid var(--line); border-radius:6px; background:var(--paper); }
textarea { resize:vertical; }
#search { width:min(55%,320px); }
footer { border-top:1px solid var(--line); padding:23px 0; font-size:14px; flex-wrap:wrap; }
footer b { margin-right:auto; }
nav a:hover,footer a:hover,.heading a:hover { text-decoration:underline; }
@media(max-width:640px){
  header { gap:8px; flex-wrap:wrap; padding:10px 0 0; }
  header nav { order:3; width:100%; margin:0; gap:22px; padding:5px 0 9px; }
  .header-tools { font-size:13px; }
  footer { gap:12px; }
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}
#theme { font-size:12px; padding:0; }
