:root {
  color-scheme: light;
  font: 16px/1.55 "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #152741; background: #eff3f8;
  --accent: #164bce; --line: #dbe3ed; --muted: #526681; --nav: #12243c;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .dropzone:focus-within, a:focus-visible {
  outline: 3px solid #5788fa; outline-offset: 2px;
}
[hidden] { display: none !important; }
.shell { width: min(1256px, calc(100% - 72px)); margin-inline: auto; }
.topbar { background: var(--nav); color: #f4f7ff; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 65px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.topbar-actions .outline { font-size: .82rem; padding: 5px 8px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font-weight: 700; white-space: nowrap; }
.brand b { color: #fff; background: #2860ef; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; font: 700 19px/1 system-ui; }
.brand-divider { color: #8ea7ca; padding-inline: 3px; }
.service { display: flex; align-items: center; gap: 8px; font-size: .83rem; color: #d0def4; }
.service i { height: 8px; width: 8px; border-radius: 50%; background: #f1b961; flex: none; }
.service[data-ready='true'] i { background: #54dba8; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 33px 0 21px; }
.eyebrow { color: #174bb8; font-weight: 700; font-size: .84rem; letter-spacing: .08em; margin: 0 0 5px; }
h1 { font-size: clamp(2rem, 4vw, 2.85rem); margin: 0; line-height: 1.15; letter-spacing: -.04em; }
.lede { color: var(--muted); margin: 10px 0 0; }
.outline, .clear { border: 0; background: transparent; color: #244469; font-weight: 650; border-radius: 8px; padding: 7px 11px; white-space: nowrap; }
.outline { border: 1px solid #c7d4e4; background: #f7faff; }
.outline:hover, .clear:hover { background: #e9f0fc; }
.samples { display: flex; align-items: center; gap: 15px; padding: 10px 14px; margin-bottom: 20px; min-height: 58px; background: #e5edf8; border: 1px solid #d0dced; border-radius: 11px; }
.samples > strong { white-space: nowrap; font-size: .9rem; }
.sample-list { display: flex; flex-wrap: wrap; gap: 7px; flex: 1; }
.sample { background: #f9fbff; border: 1px solid #cfdcec; color: #244469; border-radius: 7px; padding: 5px 11px; font-size: .88rem; }
.sample:hover { border-color: #7396ec; }
.sample[aria-pressed='true'] { color: #123d9b; background: #dce9ff; border-color: #85aaff; font-weight: 700; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr); align-items: start; gap: 20px; }
.card { background: #fff; border: 1px solid #d7e0ec; border-radius: 13px; box-shadow: 0 3px 14px #1f395409; min-width: 0; }
.card-body { padding: 19px 21px; }
.case-section { border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 15px; }
h2 { font-size: 1.13rem; margin: 0; }
.section-heading p { margin: 3px 0 0; font-size: .9rem; color: var(--muted); }
.count, .state { font-size: .79rem; color: #476382; min-width: max-content; background: #eef3f9; padding: 4px 9px; border-radius: 6px; }
.dropzone { margin: 0; display: flex; align-items: center; justify-content: center; gap: 11px; padding: 13px 10px; cursor: pointer; border: 1.5px dashed #9eb6dc; border-radius: 9px; background: #f7faff; color: #1849ad; position: relative; }
.dropzone:hover, .dropzone.dragged { background: #e9f2ff; border-color: #3b6fdf; }
.dropzone input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.plus { background: #e6edfc; border-radius: 8px; width: 33px; aspect-ratio: 1; display: grid; place-items: center; font-size: 1.25rem; }
.drop-hint { display: block; font-size: .8rem; color: var(--muted); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 9px; }
.photos:empty { display: none; }
.photos:not(:empty) { margin-top: 11px; }
.photo { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; position: relative; min-width: 0; }
.photo-view { width: 100%; display: block; padding: 0; border: 0; background: #edf2f9; text-align: left; color: #263d5b; }
.photo img { display: block; width: 100%; height: 100px; object-fit: cover; }
.photo-view span { display: block; background: white; padding: 4px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.remove { position: absolute; top: 5px; right: 5px; width: 27px; height: 27px; padding: 0; color: white; background: #152741e8; border: 0; border-radius: 50%; }
.error { color: #9e2732; font-size: .9rem; margin: 8px 0 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 13px; }
.fields label { display: block; font-size: .88rem; font-weight: 650; color: #253b57; }
.fields input:not([type='checkbox']), .fields select, .fields textarea { display: block; width: 100%; padding: 7px 9px; border: 1px solid #cbd8e8; border-radius: 7px; background: #fbfdff; color: #142842; margin-top: 4px; min-height: 39px; }
.fields input::placeholder, .fields textarea::placeholder { color: #657992; font-weight: 400; }
.fields textarea { resize: vertical; min-height: 62px; }
.span-2 { grid-column: 1 / -1; }
.quantity { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.checks { display: grid; gap: 5px; }
.checks label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.checks input { margin: 0; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-top: 15px; }
.form-footer p { color: var(--muted); font-size: .84rem; margin: 0; }
.primary { border: 0; background: var(--accent); color: white; padding: 9px 20px; font-weight: 700; border-radius: 8px; white-space: nowrap; }
.primary:hover { background: #113da8; }
.result-header { border-bottom: 1px solid var(--line); }
.result-header .section-heading { margin: 0; }
.empty { display: grid; place-content: center; text-align: center; min-height: 290px; padding: 25px; }
.empty h3 { margin: 12px 0 3px; font-size: 1.08rem; }
.empty p { margin: 0; font-size: .92rem; color: var(--muted); }
.empty-mark { display: grid; place-items: center; justify-self: center; font-size: 1.45rem; color: #1b54b7; background: #e9f1ff; width: 52px; height: 52px; border-radius: 13px; }
.result-body { padding: 17px 20px 21px; }
.verdict { border: 1px solid #c5d7fc; background: #f0f5ff; padding: 14px 15px; border-radius: 9px; }
.verdict.approve { border-color: #a7ddc9; background: #eafaf3; }
.verdict.supplement { border-color: #e7ca83; background: #fff7e4; }
.verdict.escalate, .verdict.reject { border-color: #edb6ba; background: #fff0f1; }
.verdict h3 { margin: 5px 0 4px; font-size: 1.3rem; line-height: 1.3; }
.verdict p { margin: 5px 0 0; }
.verdict .source { font-size: .82rem; color: #37547a; }
.action { font-size: .92rem; color: #233950; }
.result-group { margin-top: 15px; }
.result-group h3 { font-size: .98rem; margin: 0 0 8px; }
.result-group p { margin: 0; color: var(--muted); font-size: .9rem; }
.observation { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; overflow-wrap: anywhere; }
.observation summary { cursor: pointer; font-weight: 700; font-size: .88rem; }
.observation ul { margin: 6px 0 2px; padding-left: 19px; color: #293f5a; font-size: .86rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 0; font-size: .88rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
footer { color: #4f6480; padding: 15px 0 25px; font-size: .82rem; }
dialog { width: min(630px, calc(100% - 30px)); max-height: 84vh; color: #152741; border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 20px; }
dialog::backdrop { background: #12243c90; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
dialog p { color: var(--muted); font-size: .9rem; }
#rules-list article { padding: 8px 0; border-top: 1px solid var(--line); }
#rules-list h3, #rules-list p { margin: 0; }
#rules-list h3 { font-size: .96rem; }
#expanded { max-height: 67vh; max-width: 100%; display: block; margin: 10px auto 0; object-fit: contain; }
.access-form { display: grid; gap: 12px; padding-top: 10px; }
.access-form input { display: block; width: 100%; padding: 8px; margin-top: 4px; border: 1px solid var(--line); border-radius: 7px; }
.access-form .primary { justify-self: end; }
@media (max-width: 880px) { .shell { width: calc(100% - 36px); } .workspace { grid-template-columns: 1fr; } }
@media (max-width: 525px) {
  .shell { width: calc(100% - 24px); }
  .topbar-row { min-height: 54px; }
  .topbar-actions .service { display: none; }
  .intro { padding-top: 24px; align-items: start; }
  .intro .lede { font-size: .9rem; }
  .samples { gap: 8px; flex-wrap: wrap; }
  .samples > strong { width: 100%; }
  .sample { padding-inline: 7px; }
  .card-body, .result-body { padding-inline: 13px; }
  .fields { gap: 9px; }
  .quantity { grid-template-columns: 1fr; }
  .form-footer { align-items: start; }
}
