:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #171b18; background: #fff; font-size: 14px; line-height: 1.55; --green: #17683f; --red: #b3262e; --line: #dce2de; --muted: #626c65; }
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, input, select, textarea, dialog { border: 1px solid var(--line); border-radius: 4px; }
button { min-height: 36px; padding: 6px 12px; background: #fff; cursor: pointer; line-height: 1.4; }
button:hover { background: #f1f5f2; border-color: #8b9a90; }
button:disabled { opacity: .55; cursor: wait; }
button.primary { background: var(--green); color: #fff; border-color: var(--green); }
button.primary:hover { background: #10512f; }
button.danger, .error { color: var(--red); }
button.danger { border-color: #dfb2b4; }
button.link { border: 0; color: var(--green); background: none; padding: 0; min-height: 28px; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #72b88c; outline-offset: 2px; }
input, select, textarea { width: 100%; min-width: 0; max-width: 100%; padding: 7px 9px; background: #fff; min-height: 36px; }
input[readonly] { background: #f4f6f4; color: var(--muted); }
textarea { resize: vertical; }
label { display: grid; gap: 5px; min-width: 0; font-weight: 500; }
h1 { font-size: 22px; line-height: 1.4; margin: 0; font-weight: 650; }
h2 { font-size: 17px; margin: 22px 0 10px; }
h3 { font-size: 14px; margin: 0 0 7px; }
p { margin: 8px 0; }
.muted, .eyebrow { color: var(--muted); font-size: 13px; }
.skip-link { position: fixed; top: -80px; left: 10px; background: white; padding: 10px; z-index: 100; }
.skip-link:focus { top: 10px; }
.login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-form { width: min(100%, 380px); display: grid; gap: 17px; }
.eyebrow { font-weight: 600; margin: 0; }
.privacy-note { padding: 10px 12px; background: #f4f6f4; border-left: 3px solid #84988b; font-size: 13px; overflow-wrap: anywhere; }
.app-header { min-height: 66px; padding: 14px 28px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-size: 19px; font-weight: 700; white-space: nowrap; }
.brand span { font-size: 13px; font-weight: 400; margin-left: 10px; color: var(--muted); }
.account { display: flex; align-items: center; gap: 12px; min-width: 0; }
#account-name { overflow-wrap: anywhere; }
.navigation { display: flex; gap: 8px; border-bottom: 1px solid var(--line); padding: 0 28px; overflow-x: auto; }
.navigation button { min-height: 48px; border: 0; border-radius: 0; border-bottom: 3px solid transparent; white-space: nowrap; background: white; }
.navigation button[aria-current] { color: var(--green); border-bottom-color: var(--green); font-weight: 650; }
main { max-width: 1440px; margin: 0 auto; padding: 22px 28px 56px; }
.section-heading, .dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 14px; flex-wrap: wrap; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.filter-bar label { font-size: 12px; min-width: 130px; }
.filter-bar .muted { align-self: center; }
.simulation-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px; margin: 14px 0; background: #fff0f0; border: 1px solid #e5b9bb; color: #8b1d24; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 16px 0 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 17px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat:nth-child(4n) { border-right: 0; }
.stat:nth-last-child(-n+4) { border-bottom: 0; }
.stat strong { font-size: 26px; display: block; margin-top: 4px; overflow-wrap: anywhere; }
.table-wrap { max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; font-weight: 600; background: #f4f6f4; color: #46514a; white-space: nowrap; }
td, th { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
td { max-width: 360px; overflow-wrap: anywhere; min-width: 80px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfb; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }
.message { overflow-wrap: anywhere; }
.message:not(:empty) { padding: 10px 12px; border: 1px solid var(--line); background: #f6f8f6; }
.message.error { background: #fff4f4; border-color: #e6babc; }
.message.success { color: var(--green); background: #f0f8f2; border-color: #bcdcc6; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 16px 0; }
.inline-form label { flex: 1; max-width: 430px; }
.publication { border-left: 3px solid var(--green); padding: 5px 12px; margin-bottom: 18px; }
.content-filters { margin-bottom: 15px; }
.content-filters label:first-child { flex: 1; min-width: 180px; }
details { margin: 10px 0; }
summary { cursor: pointer; font-weight: 500; padding: 8px 0; overflow-wrap: anywhere; }
.import-panel { padding: 4px 12px; border: 1px solid var(--line); border-radius: 4px; }
.badge { display: inline-block; font-size: 12px; padding: 2px 6px; color: var(--green); background: #eef7f0; border-radius: 3px; white-space: nowrap; }
.badge.disabled { color: var(--red); background: #fff0f0; }
.badge.unknown { color: var(--muted); background: #f0f2f0; }
.definitions { font-size: 13px; }
.health-row { display: flex; flex-wrap: wrap; gap: 24px; padding: 14px 0; border-block: 1px solid var(--line); }
.health-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.enrollment { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.enrollment fieldset { border: 0; padding: 0; margin: 16px 0; min-width: 0; }
.enrollment legend { padding: 0 0 10px; font-weight: 600; }
.enrollment-fields { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.enrollment-fields > label:not(.check-label) { flex: 1 1 170px; min-width: 0; }
.enrollment-fields .check-label { min-height: 36px; }
.enrollment .section-heading h2 { margin: 0; }
.kv { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr); margin: 0; }
.kv dt, .kv dd { margin: 0; padding: 7px 10px; border-bottom: 1px solid #edf0ed; overflow-wrap: anywhere; }
.kv dt { color: var(--muted); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; padding: 12px; background: #f5f7f5; margin: 6px 0; max-height: 480px; overflow: auto; }
.records { border-top: 1px solid var(--line); }
.record { padding: 10px 0; border-bottom: 1px solid var(--line); }
.record-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px 12px; border-left: 2px solid #a9c4b1; }
.record-meta { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.detail-heading { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
dialog { padding: 0; width: min(760px, calc(100% - 28px)); max-height: calc(100dvh - 40px); color: inherit; box-shadow: 0 12px 48px #0002; }
dialog::backdrop { background: #101a1555; }
.dialog-heading { margin: 0; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { margin: 0; }
.dialog-heading button { width: 36px; font-size: 22px; padding: 0; }
#editor-form { padding: 18px 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wide { grid-column: 1 / -1; }
.field-label { display: block; font-weight: 500; margin-bottom: 6px; }
.check-label { display: flex; align-items: center; gap: 7px; font-weight: 400; }
.check-label input { width: 16px; min-height: 16px; flex: none; accent-color: var(--green); }
.answer-choices { display: flex; flex-direction: column; gap: 7px; padding: 10px; border: 1px solid var(--line); margin-bottom: 8px; }
.answer-choices label { overflow-wrap: anywhere; }
.dialog-footer { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 10px; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.dialog-footer .muted { margin-right: auto; }
.conflict-actions { padding: 12px; background: #fff1f1; color: var(--red); }
@media (max-width: 720px) {
  .app-header { padding: 12px 16px; align-items: start; }
  .brand span { display: block; margin: 2px 0 0; }
  .account { align-items: end; flex-direction: column; gap: 4px; }
  .navigation { padding: 0 8px; gap: 0; }
  main { padding: 16px 14px 32px; }
  .filter-bar { gap: 10px; }
  .filter-bar label { flex: 1; min-width: 145px; }
  .filter-bar label:has(input[type="datetime-local"]) { flex-basis: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat, .stat:nth-last-child(-n+4) { padding: 12px; border-bottom: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
  .stat strong { font-size: 23px; }
  .section-heading { align-items: start; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(90px, 110px) minmax(0, 1fr); }
  .dialog-heading, #editor-form { padding: 14px; }
  .dialog-footer .muted { width: 100%; }
  td, th { padding: 8px 10px; }
}
