:root {
  font: 14px/1.5 Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #1f2937;
  background: #f5f7fa;
  --brand: #245bd6;
  --blue-bg: #edf3ff;
  --surface: #fff;
  --subtle: #f8fafc;
  --border: #e5e7eb;
  --muted: #667085;
  --focus: #9bbcff;
  --danger: #b54143;
  --nav-width: 232px;
}
* { box-sizing: border-box; }
body { margin: 0; display: grid; grid-template-columns: var(--nav-width) minmax(0, 1fr); min-height: 100vh; }
body.nav-collapsed { --nav-width: 72px; }
aside { position: sticky; top: 0; height: 100dvh; overflow: auto; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 0 12px 12px; }
.logo { display: flex; align-items: center; min-height: 72px; gap: 12px; padding: 0 8px; font-size: 19px; font-weight: 700; white-space: nowrap; }
.logo i { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; font-style: normal; color: white; background: var(--brand); border-radius: 6px; }
.logo small { display: block; font-size: 11px; font-weight: 500; }
nav { display: grid; gap: 2px; }
nav a { display: flex; gap: 12px; align-items: center; min-height: 42px; border-radius: 6px; padding: 0 12px; white-space: nowrap; }
nav a:hover { background: var(--subtle); text-decoration: none; }
nav a[aria-current] { background: var(--blue-bg); color: var(--brand); font-weight: 650; }
nav p { margin: 14px 12px 4px; font-size: 12px; color: var(--muted); }
.nav-icon { display: grid; place-items: center; width: 18px; height: 20px; flex: 0 0 18px; font-size: 19px; font-weight: 400; line-height: 1; }
.manual { margin-top: auto; padding: 16px 12px 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.nav-collapsed .logo span, .nav-collapsed nav a span:last-child, .nav-collapsed .manual { display: none; }
.nav-collapsed nav p { overflow: hidden; width: 26px; height: 1px; background: var(--border); color: transparent; }
.nav-shade, .mobile-search { display: none; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 0 34px; background: var(--surface); border-bottom: 1px solid var(--border); }
.path, .top, .actions, .filters, .inline { display: flex; align-items: center; gap: 8px; }
.path { min-width: 0; white-space: nowrap; }
.path strong { overflow: hidden; text-overflow: ellipsis; }
.workspace { color: var(--muted); }
.workspace span { padding-left: 4px; }
.top { flex-shrink: 0; }
#global-search { display: flex; align-items: center; position: relative; }
#global-search input { width: clamp(170px, 19vw, 290px); padding-right: 40px; }
#global-search button { position: absolute; right: 2px; border: 0; }
button.icon-button { width: 32px; min-height: 32px; padding: 0; place-items: center; }
.icon-button:not(.mobile-search) { display: grid; }
.menu-icon { display: block; width: 15px; height: 12px; border-block: 1.5px solid currentColor; position: relative; }
.menu-icon::after { content: ""; position: absolute; top: 4px; left: 0; right: 0; border-top: 1.5px solid currentColor; }
.search-icon { display: block; width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; }
.search-icon::after { content: ""; position: absolute; width: 6px; border-top: 1.5px solid currentColor; right: -5px; bottom: -2px; transform: rotate(45deg); }
article { max-width: 1700px; margin: auto; padding: 30px 34px 55px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; font-weight: 650; }
h2, h3 { font-size: 15px; font-weight: 650; }
.muted, .intro, small { color: var(--muted); }
small { font-size: 11px; }
.intro { margin-top: 4px; font-size: 13px; }
.heading, .panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.heading { margin-bottom: 20px; }
.back + .heading h1 { font-size: 19px; }
.actions, .filters, .inline { flex-wrap: wrap; }
.panel { min-width: 0; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.panel-head { padding: 16px 20px; min-height: 54px; }
.panel:has(> .filters) { display: flex; flex-direction: column; }
.panel > .filters { order: -2; border-bottom: 1px solid var(--border); }
.panel > .status-tabs { order: -3; }
.pad { padding: 20px; }
.grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); overflow: hidden; }
.metrics > * { padding: 16px 20px; border-right: 1px solid var(--border); min-width: 0; }
.metrics > :last-child { border-right: 0; }
.metrics small { font-size: 12px; }
.metrics b { display: block; margin-top: 4px; font-size: 21px; font-weight: 650; overflow-wrap: anywhere; }
.metrics a:hover { background: var(--subtle); text-decoration: none; color: var(--brand); }
.metrics a:focus-visible { outline-offset: -4px; }
.metrics, table { font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 2px 7px; border-radius: 4px; background: #f3f5f8; color: var(--muted); font-size: 12px; }
.pill::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.pill.current { color: #2c5fc0; background: var(--blue-bg); }
.pill.success { color: #16815d; background: #eaf7f1; }
.pill.warn { color: #a76b15; background: #fff7e8; }
.pill.danger { color: var(--danger); background: #fdf0ef; }
.scroll { overflow: auto; border-top: 1px solid var(--border); }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; white-space: nowrap; font-size: 13px; }
td, th { padding: 8px 14px; border-bottom: 1px solid var(--border); }
th { height: 44px; background: var(--subtle); font-weight: 650; }
td { height: 54px; background: var(--surface); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--subtle); }
td small { display: block; margin-top: 2px; }
td.num, th.num { text-align: right; }
@media (min-width: 761px) {
  .panel > .scroll :is(th, td):first-child { position: sticky; left: 0; z-index: 1; }
  .panel > .scroll :is(th, td):last-child:not(:first-child) { position: sticky; right: 0; z-index: 1; }
}
.empty { padding: 24px; text-align: center; color: var(--muted); white-space: normal; }
button, input, textarea, select { color: inherit; font: inherit; }
button, input, textarea, select { border: 1px solid var(--border); border-radius: 6px; background: var(--surface); padding: 6px 10px; }
button, input:not([type="checkbox"]):not([type="radio"]), select { min-height: 36px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
button { cursor: pointer; font-size: 13px; font-weight: 550; white-space: nowrap; }
button:hover { background: var(--subtle); border-color: #c9d3e3; }
td button { min-height: 30px; }
.primary { color: white; background: var(--brand); border-color: var(--brand); }
.primary:hover { color: white; background: #194bbd; border-color: #194bbd; }
.link { color: var(--brand); }
button.link, button.danger { background: transparent; border-color: transparent; padding-inline: 4px; }
button.link:hover, button.danger:hover { text-decoration: underline; }
button.danger { color: var(--danger); }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.filters { padding: 16px 20px; align-items: end; }
.filters .field { min-width: 122px; }
.field { display: grid; gap: 6px; min-width: 0; font-size: 12px; color: var(--muted); }
.field :is(input, select, textarea) { width: 100%; min-width: 0; color: #1f2937; font-size: 14px; }
.field b { color: var(--danger); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wide { grid-column: 1 / -1; }
fieldset { min-width: 0; margin: 0; padding: 12px 16px 16px; border: 1px solid var(--border); border-radius: 6px; }
legend { padding: 0 5px; font-weight: 600; }
.form-section + .form-section { margin-top: 20px; }
.form-section h3 { margin-bottom: 12px; }
.status-tabs { display: flex; gap: 18px; padding: 0 20px; overflow: auto; border-bottom: 1px solid var(--border); }
.status-tabs button { min-height: 42px; border: 0; border-radius: 0; padding: 0 2px; border-bottom: 2px solid transparent; }
.status-tabs [aria-pressed="true"] { border-bottom-color: var(--brand); color: var(--brand); font-weight: 650; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.pagination button { min-height: 30px; }
dialog { width: min(700px, calc(100% - 24px)); max-height: 88dvh; border: 1px solid var(--border); border-radius: 8px; padding: 0; color: inherit; box-shadow: 0 8px 24px #16294420; }
dialog.confirm { width: min(460px, calc(100% - 24px)); }
dialog.drawer { margin: 0 0 0 auto; width: min(560px, 100%); height: 100dvh; max-height: 100dvh; border-radius: 0; }
dialog::backdrop { background: #1f293770; }
dialog form > .panel-head { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--border); }
dialog h2 { font-size: 17px; }
dialog .body { padding: 20px; }
dialog footer { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--border); }
.error { color: var(--danger); margin-top: 8px; }
.error:empty, #notice:empty { display: none; }
#notice { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1f2937; color: white; padding: 10px 16px; border-radius: 6px; z-index: 4; }
.help { color: var(--brand); }
.back { display: inline-block; margin-bottom: 10px; color: var(--brand); }
.quick { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.chart { min-height: 170px; display: flex; align-items: end; justify-content: space-around; gap: 12px; padding: 15px; }
.chart div { flex: 1; text-align: center; min-width: 0; }
.chart i { display: block; background: #7b9ee2; border-radius: 4px 4px 0 0; margin: 0 auto 7px; width: min(55px, 70%); }
.plot { height: 220px; position: relative; margin: 15px 0 5px; border-left: 1px solid #adb9ce; border-bottom: 1px solid #adb9ce; background: repeating-linear-gradient(0deg, transparent 0 43px, var(--border) 44px 45px); }
.plot span { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: var(--brand); border: 2px solid white; box-shadow: 0 0 0 1px var(--brand); }
.plot span:is(:focus,:hover) { background: #1f2937; }
.fee-row { padding: 8px 0; border-bottom: 1px solid var(--border); }
.search-results { list-style: none; margin: 0; padding: 0; }
.search-results li { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.definition { display: grid; grid-template-columns: minmax(80px, 110px) minmax(0, 1fr); gap: 12px; margin: 0; overflow-wrap: anywhere; }
.definition dt { color: var(--muted); }
.definition dd { margin: 0; white-space: pre-wrap; }
.timeline { padding-left: 20px; margin: 10px 0 0; }
.timeline li { padding: 7px 0; overflow-wrap: anywhere; }
.timeline small { margin-left: 8px; }
@media (max-width: 1150px) {
  .grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .workspace { display: none; }
  article, header { padding-inline: 20px; }
}
@media (max-width: 760px) {
  body, body.nav-collapsed { display: block; }
  aside { display: none; position: fixed; inset: 0 auto 0 0; width: min(260px, 85vw); z-index: 5; }
  .nav-open aside { display: flex; }
  .nav-open .nav-shade { display: block; position: fixed; inset: 0; z-index: 4; background: #1f293770; border: 0; border-radius: 0; }
  .nav-collapsed.nav-open :is(.logo span, nav a span:last-child, .manual) { display: revert; }
  .nav-collapsed.nav-open nav p { width: auto; height: auto; background: none; color: var(--muted); }
  header { min-height: 60px; padding-inline: 12px; gap: 8px; }
  .path, .top { gap: 5px; }
  .path strong { font-size: 12px; }
  #global-search { display: none; }
  button.mobile-search { display: grid; }
  .help { width: 30px; padding-inline: 0; }
  .help span { display: none; }
  .help::before { content: "?"; }
  article { padding: 16px 12px 55px; }
  .panel-head, .filters, .pad { padding-inline: 12px; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics > * { padding: 12px; border-bottom: 1px solid var(--border); }
  .metrics > :nth-child(even) { border-right: 0; }
}
.advanced { flex: 1 0 100%; color: var(--muted); }
.advanced summary { width: fit-content; cursor: pointer; color: var(--brand); font-size: 13px; }
.advanced > div { margin-top: 12px; }
.form-section .timeline { margin-bottom: 16px; }
.form-section .timeline + h3 { margin-bottom: 5px; }
.grid { align-items: start; }
