:root {
  color-scheme: light;
  font: 16px/1.6 system-ui, "Microsoft YaHei", sans-serif;
  color: #14263e;
  background: #f2f6fb;
  --border: #cbd7e7;
  --blue: #1755b8;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 1080px; margin: auto; padding: clamp(16px,4vw,40px); }
header, nav, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
header { justify-content: space-between; }
h1, h2, h3, p { margin: 0 0 .6em; }
h1 { font-size: clamp(26px,6vw,38px); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
.brand { color: var(--blue); font-weight: 750; letter-spacing: .05em; }
.muted { color: #4d627c; }
p#notice { min-height: 1.6em; color: var(--blue); margin: .55em 0; overflow-wrap: anywhere; }
p#notice.error { color: #a42529; }
#tabs { margin-bottom: 16px; }
.panel { min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: clamp(15px,3vw,25px); margin-bottom: 14px; }
.sub { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
button, .btn, select, input, textarea { font: inherit; }
button, .btn { display: inline-flex; text-decoration: none; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: #203a5d; background: #fff; border-radius: 10px;
  min-height: 44px; padding: .42em .8em; font-weight: 640; cursor: pointer; text-align: center; }
button.primary, button[aria-current="true"] { color: #fff; background: var(--blue); border-color: var(--blue); }
button:disabled, select:disabled { opacity: .6; cursor: not-allowed; }
:focus-visible { outline: 3px solid #5289eb; outline-offset: 2px; }
label { display: grid; gap: 5px; margin: 10px 0; font-weight: 600; }
label.check { display: flex; align-items: center; }
input:not([type=checkbox]), select, textarea { width: 100%; min-width: 0; border: 1px solid var(--border);
  color: inherit; background: #fff; border-radius: 9px; padding: .55rem .7rem; }
textarea { min-height: 92px; resize: vertical; font-weight: 400; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,220px),1fr)); gap: 12px; }
.rich { white-space: pre-wrap; overflow-wrap: anywhere; margin: .5rem 0 1rem; }
.rich .katex-display { overflow-x: auto; overflow-y: hidden; }
.image { max-width: 100%; max-height: 432px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; margin: .4em .4em .6em 0; }
details > summary { cursor: pointer; padding: .38em 0; font-weight: 650; }
.qnav button { font-variant-numeric: tabular-nums; font-size: .92rem; }
.list-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #e3eaf4; padding: .65em 0; }
.warning { background: #fff6e6; color: #713e04; padding: .6rem .8rem; border-radius: 8px; white-space: pre-wrap; }
