:root {
  color-scheme: light;
  --ink: #202522; --muted: #737b77; --line: #e5e9e7;
  --paper: #f7f9f8; --surface: #fff; --hover: #f0f4f2;
  --green: #087a4e; --green-dark: #066540; --green-soft: #e6f5ed;
  --blue: #276584; --blue-soft: #e8f2f8; --amber: #8c621c; --amber-soft: #fff4dd;
  --red: #b13f43; --red-soft: #fcebec; --shadow: 0 18px 60px #13291d16;
}
* { box-sizing: border-box; letter-spacing: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; color: var(--ink); background: var(--surface); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button, input, select { max-width: 100%; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.3; text-wrap: balance; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #1b9a7866; outline-offset: 3px; }
button:disabled, [aria-disabled="true"] { opacity: .4; pointer-events: none; }
.icon { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 750; line-height: 1.15; }
.brand img { width: 36px; height: 36px; flex: 0 0 36px; }
.brand small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 500; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 6px; color: var(--ink); background: var(--surface); font-weight: 650; line-height: 1.4; text-align: center; transition: background .15s, border-color .15s; }
.button.primary { color: #fff; background: var(--green); border-color: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { border-color: var(--line); background: var(--surface); }
.button.secondary:hover, .button.ghost:hover { background: var(--hover); border-color: var(--line); }
.button.small { min-height: 36px; padding: 7px 12px; font-size: 12px; }
.button.small .icon { width: 16px; height: 16px; flex-basis: 16px; }
.button.danger { color: var(--red); background: var(--red-soft); border-color: transparent; }
.button.danger.solid { color: #fff; background: var(--red); }
.button.danger.ghost { background: transparent; }
.icon-button { position: relative; display: inline-flex; justify-content: center; align-items: center; width: 36px; height: 36px; flex: 0 0 36px; padding: 0; border: 1px solid transparent; border-radius: 6px; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--ink); background: var(--hover); }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.text-link:hover { color: var(--green); }
.eyebrow { display: block; margin-bottom: 14px; color: var(--green); font-size: 12px; font-weight: 650; }
.subtle { color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 4px; color: var(--muted); background: var(--hover); font-size: 11px; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.active { color: var(--green); background: var(--green-soft); }
.badge.expired { color: var(--red); background: var(--red-soft); }
.segmented { display: inline-flex; align-items: center; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 7px 16px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; font-size: 12px; white-space: nowrap; }
.segmented button[aria-pressed="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 4px #1736280c; }
.segmented .icon { width: 16px; height: 16px; flex-basis: 16px; }
input:not([type="checkbox"]):not([type="hidden"]), select { width: 100%; min-width: 0; height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); }
input::placeholder { color: #929a96; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--green); cursor: pointer; }
input[type="file"] { height: auto !important; font-size: 12px; }
input::file-selector-button { padding: 6px 10px; margin-right: 9px; border: 0; border-radius: 4px; color: var(--ink); background: var(--hover); }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px; color: #fff; background: var(--green); }
.skip-link:focus { top: 12px; }
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 15px; margin-bottom: 22px; border: 1px solid #b9ddc9; border-radius: 6px; color: var(--green); background: var(--green-soft); }
.flash.error { color: var(--red); background: var(--red-soft); border-color: #efc7c9; }
.flash .icon-button { margin-left: auto; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 100; max-width: calc(100% - 32px); transform: translateX(-50%); padding: 11px 20px; border-radius: 6px; color: #fff; background: #202823; box-shadow: var(--shadow); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
