:root {
  color-scheme: light;
  --page: #eef2f6;
  --surface: #fff;
  --surface-soft: #f7f9fb;
  --line: #dce4eb;
  --line-strong: #c8d3de;
  --ink: #17212b;
  --ink-soft: #44515d;
  --muted: #596773;
  --accent: #1168d4;
  --accent-dark: #0755b5;
  --accent-soft: #eaf3ff;
  --green: #087a45;
  --danger: #b93632;
  --shadow: 0 8px 24px rgba(24, 43, 61, .06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--page); scrollbar-gutter: stable; }
body { margin: 0; color: var(--ink); background: var(--page); font-size: 14px; line-height: 1.5; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button, a, input, select { touch-action: manipulation; -webkit-tap-highlight-color: rgba(0, 113, 227, .18); }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--accent); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 8px 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: var(--shadow); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.app-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.app-header-inner, .page-main, .page-footer { width: min(1280px, calc(100% - 48px)); margin: 0 auto; }
.app-header-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.app-brand { min-width: 0; display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.app-brand:hover .brand-copy strong { color: var(--accent-dark); }
.app-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 8px; }
.brand-mark { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 1px solid #cfe2fa; border-radius: 8px; }
.brand-mark svg { width: 20px; height: 20px; }
.brand-copy { min-width: 0; }
.brand-copy strong { display: block; overflow: hidden; font-size: 18px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.data-status { min-width: 0; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.data-status::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 14v2.2l1.6 1'/%3E%3Cpath d='M16 2v3'/%3E%3Cpath d='M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338'/%3E%3Cpath d='M3 9h5.859'/%3E%3Cpath d='M8 2v3'/%3E%3Ccircle cx='16' cy='16' r='6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 14v2.2l1.6 1'/%3E%3Cpath d='M16 2v3'/%3E%3Cpath d='M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338'/%3E%3Cpath d='M3 9h5.859'/%3E%3Cpath d='M8 2v3'/%3E%3Ccircle cx='16' cy='16' r='6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.page-main { padding-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.workspace { overflow: clip; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.workspace-toolbar { min-height: 78px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.workspace-heading { min-width: 240px; }
.workspace-heading h1 { margin: 0; font-size: 19px; line-height: 1.2; letter-spacing: -.01em; }
.workspace-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.filters { width: min(760px, 100%); display: grid; grid-template-columns: minmax(125px,.7fr) minmax(170px,1fr) minmax(230px,1.35fr); gap: 8px; }
.filter-field { position: relative; min-width: 0; display: block; }
.filter-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.field-control { position: relative; display: block; }
.field-control svg { position: absolute; left: 12px; top: 11px; z-index: 1; width: 17px; height: 17px; color: #778491; pointer-events: none; }
.field-control input, .field-control select { width: 100%; height: 40px; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: 6px; }
.field-control input { padding: 0 12px 0 38px; }
.field-control select { padding: 0 32px 0 38px; }
.field-control input:focus, .field-control select:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(17,104,212,.12); }
.field-control input:disabled, .field-control select:disabled { color: var(--muted); background: #f0f3f6; cursor: wait; opacity: .78; }

.noscript-notice { margin: 14px; padding: 12px 14px; color: #674500; background: #fff8e6; border: 1px solid #e7c873; border-radius: 8px; font-weight: 650; }
.table-scroll { width: 100%; overflow: auto; overscroll-behavior-x: contain; }
.bank-table { width: 100%; min-width: 1010px; border-collapse: collapse; table-layout: fixed; }
.bank-table th, .bank-table td { padding: 10px 12px; border-bottom: 1px solid #e5ebf0; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bank-table th { position: sticky; top: 0; z-index: 2; height: 44px; padding: 0; color: #33485c; background: #edf2f6; border-bottom-color: #cbd6df; box-shadow: inset 0 -1px #cbd6df, 0 2px 5px rgba(24,43,61,.06); font-size: 13px; font-weight: 760; }
.bank-table th button { width: 100%; min-height: 44px; padding: 9px 12px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; color: inherit; background: transparent; border: 0; font-weight: inherit; transition: color 120ms ease-out, background-color 120ms ease-out; }
.bank-table th button:disabled { color: inherit; cursor: default; opacity: 1; }
.bank-table th button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.bank-table th button svg { width: 15px; height: 15px; flex: 0 0 15px; stroke-width: 2.25; }
.bank-table th[aria-sort="ascending"], .bank-table th[aria-sort="descending"] { color: var(--accent-dark); background: #e3effd; box-shadow: inset 0 -3px var(--accent), 0 2px 5px rgba(24,43,61,.06); }
.bank-table th:first-child, .bank-table td:first-child { width: 76px; text-align: center; }
.bank-table th:first-child button { justify-content: center; }
.bank-table th:nth-child(2), .bank-table td:nth-child(2) { width: 250px; text-align: left; }
.bank-table th:nth-child(2) button { justify-content: flex-start; }
.bank-table th:nth-child(3), .bank-table td:nth-child(3) { width: 150px; text-align: left; }
.bank-table th:nth-child(3) button { justify-content: flex-start; }
.bank-table th:nth-child(4), .bank-table td:nth-child(4) { width: 146px; }
.bank-table th:nth-child(5), .bank-table td:nth-child(5) { width: 146px; }
.bank-table th:nth-child(6), .bank-table td:nth-child(6) { width: 126px; }
.bank-table th:nth-child(7), .bank-table td:nth-child(7) { width: 116px; text-align: center; }
.bank-table tbody tr:hover td { background: #f8fbfe; }
.bank-table tbody tr:last-child td { border-bottom: 0; }
.rank-value { font-weight: 760; }
.bank-history-button { position: relative; width: 100%; min-width: 0; padding: 4px 28px 4px 0; color: inherit; background: transparent; border: 0; text-align: left; cursor: pointer; }
.bank-history-button:disabled { color: inherit; cursor: default; opacity: 1; }
.bank-history-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.bank-name { display: block; overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 680; text-overflow: ellipsis; }
.bank-history-button:hover .bank-name { color: var(--accent-dark); }
.history-affordance { position: absolute; top: 50%; right: 2px; color: var(--muted); font-size: 20px; line-height: 1; opacity: .7; transform: translateY(-50%); transition: color 120ms ease-out, opacity 120ms ease-out; }
.type-badge { display: inline-block; padding: 3px 7px; color: var(--ink-soft); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; }
.change { font-size: 12px; font-weight: 680; }
.change.up { color: var(--green); }
.change.down { color: var(--danger); }
.change.same, .change.new { color: var(--muted); }
.empty-message, .error-message { height: 220px; color: var(--muted); text-align: center !important; }
.error-message { color: var(--danger); }

.workspace-footer { padding: 10px 18px; display: flex; align-items: center; color: var(--muted); background: var(--surface-soft); border-top: 1px solid var(--line); font-size: 12px; line-height: 1.55; }
.source-summary { margin: 0; }
.source-summary strong { color: var(--ink-soft); }
.data-disclaimer { margin: 0; padding: 10px 18px 12px; color: var(--muted); background: var(--surface-soft); border-top: 1px solid var(--line); font-size: 12px; line-height: 1.6; }
.data-disclaimer p { max-width: 1100px; margin: 0; }
.page-footer { margin-top: 20px; margin-bottom: 28px; color: var(--muted); font-size: 12px; text-align: center; }
.page-footer p { margin: 3px 0; }

.history-dialog { width: min(780px, calc(100vw - 32px)); max-height: min(84vh, 820px); padding: 0; overflow: hidden; color: var(--ink); background: var(--surface); border: 0; border-radius: 12px; box-shadow: 0 24px 70px rgba(15,31,45,.24); }
.history-dialog::backdrop { background: rgba(20,31,42,.42); backdrop-filter: blur(2px); }
.history-dialog-shell { max-height: min(84vh,820px); display: flex; flex-direction: column; }
.history-dialog-header { padding: 18px 20px 15px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.history-dialog-title h2 { margin: 0; font-size: 19px; }
.history-dialog-title p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.dialog-close { width: 44px; height: 44px; flex: 0 0 44px; position: relative; display: grid; place-items: center; padding: 0; color: var(--ink-soft); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; font-size: 0; }
.dialog-close:hover { color: var(--ink); background: #edf2f6; }
.dialog-close::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E") center / contain no-repeat;
}
.history-dialog-body { padding: 16px 20px 20px; overflow: auto; }
.history-aliases, .history-event { margin: 0 0 12px; padding: 9px 11px; color: var(--ink-soft); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 7px; font-size: 12px; }
.history-event { border-left: 3px solid var(--accent); }
.history-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.history-table th, .history-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.history-table th { color: var(--muted); background: var(--surface-soft); font-weight: 700; }
.history-table th:first-child, .history-table td:first-child, .history-table th:nth-child(2), .history-table td:nth-child(2) { text-align: center; }
.history-source-name { margin-top: 8px; color: var(--muted); font-size: 11px; }

@media (hover: hover) and (pointer: fine) {
  .bank-table th button:not(:disabled):hover { color: var(--accent-dark); background: rgba(17,104,212,.08); }
  .bank-history-button:not(:disabled):hover .history-affordance { color: var(--accent-dark); opacity: 1; }
}
.bank-table th button:not(:disabled):active { background: rgba(17,104,212,.13); }

@media (max-width: 820px) {
  .app-header-inner, .page-main, .page-footer { width: min(100% - 24px, 1280px); }
  .app-header-inner { min-height: 62px; }
  .data-status { display: none; }
  .page-main { padding-top: 10px; gap: 10px; }
  .workspace-toolbar { padding: 14px; align-items: stretch; flex-direction: column; gap: 12px; }
  .filters { width: 100%; grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .table-scroll { overflow: auto; scrollbar-gutter: auto; }
  .bank-table { min-width: 870px; }
  .workspace-footer { align-items: flex-start; }
  .data-disclaimer { padding: 10px 14px; }
}
@media (max-width: 520px) {
  body { font-size: 13px; }
  .app-header-inner, .page-main, .page-footer { width: calc(100% - 16px); }
  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
  .brand-copy strong { font-size: 16px; }
  .filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .field-control input, .field-control select { font-size: 16px; }
  .workspace-footer, .data-disclaimer { padding-left: 12px; padding-right: 12px; }
  .history-dialog { width: calc(100vw - 16px); }
  .history-dialog-header, .history-dialog-body { padding-left: 14px; padding-right: 14px; }
  .history-table { min-width: 620px; }
  .history-dialog-body { overflow: auto; }
}
