@font-face {
  font-family: "IBM Plex Sans";
  src: url("vendor/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("vendor/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("vendor/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 750;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ground: #f3f7f5;
  --surface: #fff;
  --raised: #f6f8f7;
  --active: #e7eeeb;
  --border: #e3e9e6;
  --rule: #eef1ef;
  --control: #cbd6d1;
  --text: #15231f;
  --muted: #53645d;
  --accent: #1b6c65;
  --positive: #1e704b;
  --negative: #a52c32;
  --card: 8px;
  --sheet: 16px;
  --gap: 24px;
  --sidebar: 216px;
  font-family: "IBM Plex Sans", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--ground);
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr); }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, p, dl, dd { margin: 0; }
h1 { font-size: 25px; font-weight: 650; letter-spacing: -.025em; }
h2 { font-size: 16px; font-weight: 650; letter-spacing: -.012em; }
.muted { color: var(--muted); }
.negative { color: var(--negative); }
.positive { color: var(--positive); }

.masthead { grid-column: 1 / -1; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr) auto; align-items: center; padding-right: 17px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 17px; text-decoration: none; font-weight: 700; white-space: nowrap; }
.brand-mark { flex: none; width: 32px; height: 32px; }
.brand-sub { margin-left: 7px; font-weight: 550; }
.workspace { display: flex; align-items: center; gap: 12px; padding-left: var(--gap); color: var(--muted); font-size: 13px; }
.workspace strong { color: var(--text); font-weight: 550; }
.button { min-height: 34px; padding: 5px 12px; border: 1px solid var(--control); border-radius: 6px; color: var(--text); background: var(--surface); font-weight: 550; white-space: nowrap; }
.button:hover:not(:disabled) { background: var(--raised); }
.button.primary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-color: #18352e; background: #18352e; color: white; }
.button.primary:hover:not(:disabled) { background: #244a41; }
.button svg, .text-link svg, .field-list svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.sidebar { grid-column: 1; grid-row: 2; position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; justify-content: space-between; min-height: calc(100vh - 56px); padding: 22px 14px 16px; }
.nav-label { margin: 0 10px 10px; color: var(--muted); font-size: 12px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; margin: 3px 0; min-height: 39px; padding: 8px 10px; color: var(--muted); text-decoration: none; border-radius: 6px; }
.sidebar nav a svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.sidebar nav a:hover { background: var(--raised); color: var(--text); }
.sidebar nav a[aria-current] { background: var(--active); color: var(--text); font-weight: 650; }
.sidebar nav a:last-child { margin-top: 19px; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; margin: 0 8px; color: var(--muted); font-size: 12px; }
.source-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* 12-column canvas in two spans. Panels and full-width metric strips share 24px gutters. */
.sheet { grid-column: 2; grid-row: 2; min-width: 0; margin: 0 8px 8px 0; padding: var(--gap); background: var(--surface); border: 1px solid var(--border); border-radius: var(--sheet); }
.sheet > * + * { margin-top: var(--gap); }
.page-heading { display: flex; justify-content: space-between; gap: 15px; align-items: end; min-height: 58px; }
.page-heading p, .section-heading p { color: var(--muted); margin-top: 4px; }
.period { flex: none; align-self: start; display: flex; gap: 8px; align-items: center; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-size: 12px; }
.period strong { font-size: 13px; font-weight: 550; color: var(--text); }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--card); }
.metrics.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 16px 17px; }
.metric + .metric { border-left: 1px solid var(--rule); }
.metric-label { font-size: 13px; font-weight: 550; color: var(--muted); }
.metric strong { font-size: clamp(21px, 2.1vw, 31px); font-weight: 550; letter-spacing: -.035em; line-height: 1.15; white-space: nowrap; }
.metric strong.metric-empty { color: var(--muted); font-size: 19px; letter-spacing: 0; }
.metric-note { font-size: 12px; color: var(--muted); }

.overview-grid, .two-grid, .source-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.two-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.source-grid { grid-template-columns: minmax(205px, .68fr) minmax(0, 2fr); }
.stack { min-width: 0; display: grid; gap: var(--gap); }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--card); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding: 15px 16px 12px; min-width: 0; }
.panel-heading p { color: var(--muted); font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.section-heading { margin-bottom: 12px; }
.section-heading p { font-size: 13px; }
.text-link, .text-button { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 12px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.text-link { margin-top: 2px; }
.text-link:hover, .text-button:hover { text-decoration: underline; }
.text-button { background: none; border: 0; padding: 8px 0; }
.empty { padding: 12px 14px; margin: 0 16px 16px; border: 1px dashed var(--border); border-radius: 6px; color: var(--muted); font-size: 13px; }

.bar-list { display: grid; gap: 14px; padding: 9px 16px 18px; }
.bar-item { min-width: 0; }
.bar-label { display: grid; grid-template-columns: 19px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.bar-label > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-rank { color: var(--muted); font-size: 12px; }
.bar-label strong { font-size: 15px; font-weight: 650; }
.bar-track { margin-left: 27px; height: 7px; background: #edf3f0; border-radius: 4px; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 4px; }
.chart-finding { display: flex; align-items: center; gap: 11px; margin: 0 16px 14px; padding: 8px 10px; border-radius: 6px; background: #eef5f2; color: #36554b; font-size: 12px; }
.chart-finding strong { font-size: 22px; font-weight: 650; color: var(--accent); line-height: 1.2; }

.line-metrics { padding: 0 16px 5px; }
.line-metrics > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 55px; padding: 5px 0; border-top: 1px solid var(--rule); }
.line-metrics dt { font-size: 13px; font-weight: 550; }
.line-metrics dd { display: flex; flex-direction: column; align-items: end; font-size: 12px; color: var(--muted); }
.line-metrics dd strong { font-size: 18px; color: var(--text); font-weight: 550; white-space: nowrap; }
.delta { font-size: 12px; white-space: nowrap; }
.search-term { margin: 0 16px 8px; font-weight: 650; font-size: 13px; overflow-wrap: anywhere; }
.inline-stats { display: flex; flex-wrap: wrap; gap: 8px 25px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.inline-stats strong { color: var(--text); margin-left: 4px; font-weight: 650; }
.basic-source { margin: 0 16px 16px; padding: 12px 0 0; border-top: 1px solid var(--rule); }
.basic-source p { margin-top: 4px; font-size: 13px; color: var(--muted); }

.table-scroll { overflow-x: auto; min-width: 0; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead th { font-weight: 550; color: var(--muted); font-size: 12px; white-space: nowrap; }
tbody th { font-weight: 550; }
th, td { padding: 10px 9px; border-top: 1px solid var(--rule); }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.number { text-align: right; white-space: nowrap; }
.table-empty { text-align: center; color: var(--muted); padding: 20px 0; }
.row-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-width: 110px; overflow-wrap: anywhere; }
.row-sub { color: var(--muted); font-size: 12px; }
.multiline { white-space: pre-line; overflow-wrap: anywhere; }
.filters { display: grid; grid-template-columns: minmax(160px, 1.6fr) minmax(90px, .8fr) minmax(82px, .65fr) minmax(132px, 1fr); gap: 12px; padding: 0 16px 12px; }
.filters label, .compact-control { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 12px; }
input, select { min-width: 0; min-height: 34px; width: 100%; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--control); background: var(--surface); color: var(--text); }
.list-status { margin: 0 16px 7px; color: var(--muted); font-size: 12px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12px; }
.pagination > div { display: flex; gap: 5px; }

.source-menu { overflow: hidden; }
.source-item { display: block; padding: 10px 16px; text-align: left; width: 100%; border: 0; border-top: 1px solid var(--rule); background: var(--surface); color: var(--text); }
.source-item:hover, .source-item[aria-pressed="true"] { background: var(--raised); }
.source-item strong, .source-item small, .source-item span { display: block; overflow-wrap: anywhere; }
.source-item strong { font-size: 13px; }
.source-item span, .source-item small { color: var(--muted); font-size: 12px; }
.source-item small { margin-top: 3px; }
.source-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; padding: 0 16px 11px; font-size: 12px; color: var(--muted); }
.source-meta strong { color: var(--text); font-weight: 650; }

dialog { width: min(620px, calc(100% - 30px)); max-height: calc(100% - 35px); padding: 19px; border: 1px solid var(--control); border-radius: var(--sheet); color: var(--text); background: var(--surface); }
dialog::backdrop { background: #10271f66; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 7px; }
.dialog-heading h2 { overflow-wrap: anywhere; }
#upload-form { display: grid; gap: 10px; margin-top: 16px; }
#upload-form button { justify-self: start; }
#upload-status { margin-top: 12px; font-size: 13px; }
#upload-status ul { margin: 0 0 6px; padding-left: 20px; overflow-wrap: anywhere; }
.field-list { margin-top: 10px; }
.field-list > div { display: grid; grid-template-columns: minmax(105px, 1fr) minmax(0, 1.5fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); }
.field-list dt { color: var(--muted); overflow-wrap: anywhere; }
.field-list dd { white-space: pre-line; overflow-wrap: anywhere; }
.field-list a { display: inline-flex; gap: 5px; align-items: center; color: var(--accent); }

@media (max-width: 1080px) {
  body { display: block; }
  .masthead { height: 54px; grid-template-columns: auto 1fr auto; }
  .workspace { justify-content: center; padding: 0; }
  .sidebar { position: static; min-height: 0; padding: 0 15px; }
  .sidebar nav { display: flex; gap: 5px; overflow-x: auto; }
  .sidebar nav a, .sidebar nav a:last-child { margin: 0; min-height: 43px; white-space: nowrap; }
  .nav-label, .sidebar-footer { display: none; }
  .sheet { margin: 0 8px 8px; }
}

@media (max-width: 740px) {
  :root { --gap: 16px; }
  .overview-grid, .two-grid, .source-grid { grid-template-columns: minmax(0, 1fr); }
  .overview-grid .stack { display: contents; }
  .overview-grid .ranking-panel { order: -2; }
  .overview-grid .cost-panel { order: -1; }
  .source-menu { display: grid; grid-template-columns: 1fr 1fr; }
  .source-menu > .panel-heading { grid-column: 1 / -1; }
  .source-item:nth-child(odd) { border-left: 1px solid var(--rule); }
  .page-heading { align-items: start; flex-direction: column; gap: 8px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics:not(.three) .metric:nth-child(odd) { border-left: 0; }
  .metrics:not(.three) .metric:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .metrics.three { grid-template-columns: minmax(0, 1fr); }
  .metrics.three .metric + .metric { border-left: 0; border-top: 1px solid var(--rule); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .sheet { margin: 0; border-radius: 0; border-left: 0; border-right: 0; min-height: calc(100vh - 98px); }
  .masthead { padding-right: 16px; }
  .brand { padding: 0 16px; }
  .workspace { visibility: hidden; }
  .masthead .button, .sidebar nav a, input, select { min-height: 44px; }
  .sidebar nav a svg { display: none; }
  .sidebar { padding: 0 16px; }
  .sidebar nav { gap: 3px; }
  .sidebar nav a { padding: 8px 6px; font-size: 13px; }
  .panel-heading { padding-left: 12px; padding-right: 12px; }
  .panel-heading .text-link { font-size: 12px; }
  .table-scroll { padding: 0 12px; }
  .bar-list { padding-left: 12px; padding-right: 12px; }
  .chart-finding { margin-left: 12px; margin-right: 12px; }
  .metric { padding: 11px 12px; }
  .metric strong { font-size: 24px; }
  .line-metrics { padding-left: 12px; padding-right: 12px; }
  h1 { font-size: 23px; }
  th, td { padding-left: 7px; padding-right: 7px; }
}

/* The four supplied reference screens define the shell, colors, tables and spacing. */
:root {
  --ground: #f5f6f8;
  --raised: #f0f2f5;
  --active: #fcedf1;
  --border: #e0e5ed;
  --rule: #e3e8ef;
  --control: #dce2eb;
  --text: #192a3d;
  --muted: #667c96;
  --accent: #e34361;
  --positive: #15836e;
  --negative: #b73751;
  --card: 0px;
  --sheet: 8px;
  --sidebar: 158px;
  font-family: "IBM Plex Sans", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
body { grid-template-rows: 82px minmax(0, 1fr); }
.masthead { background: #fff; border-bottom: 1px solid var(--border); grid-template-columns: auto 1fr auto; padding: 0 24px; gap: 18px; }
.brand { padding: 0; gap: 13px; font-size: 17px; font-weight: 650; }
.brand-mark { display: flex; justify-content: center; align-items: center; width: 40px; height: 40px; border-radius: 8px; color: #fff; background: #dc405b; font-size: 15px; font-weight: 650; letter-spacing: -.08em; }
.brand-sub { display: block; margin: 0; font-size: 12px; color: #687d96; font-weight: 400; }
.workspace { justify-content: flex-end; font-size: 12px; }
.button.primary { background: #fff; border-color: #dce2eb; color: #192a3d; font-weight: 500; font-size: 14px; }
.button.primary:hover:not(:disabled) { background: #f7f8fb; }
.sidebar { background: #fff; border-right: 1px solid var(--border); padding: 23px 12px; min-height: calc(100vh - 82px); justify-content: start; align-self: stretch; position: static; }
.nav-label { margin: 0 10px 12px; }
.sidebar nav a { justify-content: center; min-height: 44px; margin: 7px 0; padding: 10px 5px; color: #20364f; font-size: 14px; border-radius: 5px; }
.sidebar nav a[aria-current] { background: #fcedf1; color: #e13f5d; font-weight: 650; }
.sidebar nav a:last-child { margin-top: 7px; }
.sidebar nav a:nth-last-child(2) { margin-top: 25px; border-top: 1px solid var(--border); border-radius: 0; padding-top: 16px; }
.sidebar-footer { display: block; margin: 24px 10px 0; font-size: 12px; }
.sidebar-footer p { margin-top: 24px; line-height: 1.6; }
.sheet { margin: 0; padding: 24px; border: none; border-radius: 0; background: #f5f6f8; min-height: calc(100vh - 82px); }
.page-heading { min-height: 83px; align-items: start; margin-bottom: 20px; }
.page-heading h1 { font-size: 24px; margin: 5px 0 7px; font-weight: 700; letter-spacing: -.035em; }
.page-heading p { font-size: 12px; color: var(--muted); margin: 0; }
.page-heading .breadcrumb { font-size: 12px; color: #697e96; }
.date-control { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 1px; flex: none; }
.date-control select { width: 210px; min-height: 36px; font-size: 14px; }
select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%23667c96' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.metrics { background: #fff; border: 0; border-top: 2px solid #ed4565; border-bottom: 1px solid var(--border); border-radius: 0; }
.metric { padding: 17px 18px; gap: 6px; min-height: 118px; }
.metric strong { font-size: 29px; font-weight: 650; letter-spacing: -.02em; }
.metric-label, .metric-note { font-size: 12px; }
.metric + .metric { border-left-color: var(--border); }
.metric strong.metric-empty { font-size: 26px; color: #263448; }
.sheet > * + * { margin-top: 18px; }
.panel { border: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 0; }
.panel-heading { padding: 18px 20px 13px; }
h2 { font-size: 16px; font-weight: 650; color: #17273b; }
.panel-heading p { font-size: 12px; }
.two-grid { gap: 16px; align-items: start; }
.charts-row .panel { min-height: 300px; }
.table-scroll { padding: 0 20px 10px; }
table { font-size: 14px; }
thead { background: #f0f2f5; }
thead th { padding-top: 11px; padding-bottom: 11px; border: 0; font-size: 12px; font-weight: 400; }
thead th:first-child, tbody th:first-child, tbody td:first-child { padding-left: 11px; }
thead th:last-child, tbody td:last-child { padding-right: 11px; }
td, tbody th { padding-top: 12px; padding-bottom: 12px; font-size: 14px; font-weight: 400; border-top: 0; border-bottom: 1px solid var(--border); }
.row-sub { font-size: 12px; }
.row-title { -webkit-line-clamp: 2; min-width: 160px; max-width: 450px; font-size: 14px; }
.row-sub a { color: #5b75a4; text-decoration: none; }
.row-sub a:hover { text-decoration: underline; }
.filters { padding: 0 20px 12px; gap: 12px; }
.filters label, .compact-control { font-size: 12px; }
.filters input, .filters select, .compact-control select { font-size: 14px; min-height: 34px; }
.compact-control { flex: none; }
.list-status { margin-left: 20px; font-size: 12px; }
.order-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; padding: 5px 20px 12px; }
.order-grid span { display: block; color: var(--muted); font-size: 12px; }
.order-grid strong { display: block; font-size: 23px; color: #15273d; margin: 3px 0 10px; font-weight: 650; }
.order-grid .pending-value { font-size: 19px; color: #4d6279; font-weight: 500; }
.order-track { height: 6px; border-radius: 2px; background: #eff1f4; }
.order-track > div { height: 100%; background: #e34361; }
.panel-note { margin: 0; padding: 0 20px 17px; color: var(--muted); font-size: 12px; }
.line-metrics { padding: 0 20px 8px; }
.line-metrics > div { min-height: 53px; }
.line-metrics dt { font-size: 14px; }
.line-metrics dd strong { font-size: 19px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 15px; padding: 0 20px 1px; color: var(--muted); font-size: 12px; min-height: 21px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.line-chart { display: block; width: calc(100% - 32px); margin: 6px 16px 0; overflow: visible; }
.line-chart text { font: 12px "IBM Plex Sans", "Microsoft YaHei", sans-serif; fill: #667c96; }
.chart-caption { font-size: 12px; color: var(--muted); padding: 0 20px 13px; }
.chart-empty { position: relative; padding: 25px 20px; min-height: 235px; display: flex; align-items: center; justify-content: center; }
.empty-chart-lines { position: absolute; inset: 22px 22px 30px 45px; border-top: 1px solid #e4e9f0; border-bottom: 1px solid #e4e9f0; }
.empty-chart-lines::before, .empty-chart-lines::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: #e4e9f0; top: 33%; }
.empty-chart-lines::after { top: 66%; }
.chart-empty p { position: relative; background: #fff; color: var(--muted); font-size: 14px; padding: 7px 12px; max-width: 100%; }
.scope-note { padding: 15px; color: #6d8096; font-size: 12px; background: #eff1f4; overflow-wrap: anywhere; }
.source-footer { color: #647d99; font-size: 12px; }
.empty { margin-top: 8px; }
.ip-empty { text-align: center; padding: 45px 20px 30px; }
.ip-placeholder { height: 48px; width: 48px; background: #f4efe7; border-radius: 10px; margin: 0 auto 14px; }
.ip-empty strong { font-size: 16px; font-weight: 650; }
.ip-empty p { margin-top: 12px; color: #7e8791; font-size: 12px; }
.reserved-grid { padding: 0 20px 20px; gap: 24px; }
.reserved-grid section { min-width: 0; }
.reserved-grid h3 { font-size: 16px; font-weight: 650; margin: 0 0 3px; }
.reserved-fields > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 47px; border-bottom: 1px solid var(--border); font-size: 14px; }
.reserved-fields dd { color: var(--muted); font-size: 12px; flex: none; }
.inline-stats { padding: 0 20px 15px; margin: 0; font-size: 14px; }
.search-term { padding-top: 2px; }
.text-button, .text-link { color: #3968ba; font-size: 12px; font-weight: 400; }
.field-list dt, .field-list dd { font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-page="taobao"] .metrics { border-top-color: #009a85; }
[data-page="douyin"] .metrics { border-top-color: #496cf0; }
[data-page="ip"] .metrics { border-top-color: #ae790e; }
[data-page="ip"] .metrics .metric { min-height: 120px; }

@media (max-width: 1080px) {
  .masthead { height: 72px; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--border); padding: 0 16px; min-height: 0; }
  .sidebar nav a, .sidebar nav a:last-child, .sidebar nav a:nth-last-child(2) { margin: 0; border: 0; border-radius: 0; padding: 12px 9px; min-height: 46px; }
  .sidebar-footer { display: none; }
  .sheet { margin: 0; min-height: calc(100vh - 118px); }
  .metric { padding: 14px 13px; }
  .metric strong { font-size: 25px; }
}
@media (max-width: 740px) {
  .masthead { padding: 0 16px; gap: 10px; }
  .brand { gap: 9px; font-size: 15px; }
  .brand-sub { font-size: 11px; }
  .brand-mark { width: 36px; height: 36px; }
  .workspace { display: none; }
  .masthead { grid-template-columns: 1fr auto; }
  .page-heading { min-height: 98px; gap: 8px; margin-bottom: 18px; }
  .date-control { margin: 0; width: 100%; justify-content: space-between; }
  .date-control select { width: 210px; }
  .metrics .metric { min-height: 112px; }
  .metrics .metric:nth-child(n+3) { border-top: 1px solid var(--border); }
  .metric strong { font-size: 25px; }
  .order-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .two-grid { align-items: start; }
  .charts-row .panel { min-height: 0; }
  .panel-heading { padding: 16px 16px 12px; }
  .table-scroll { padding-left: 16px; padding-right: 16px; }
  .filters { padding-left: 16px; padding-right: 16px; }
  .reserved-fields { font-size: 13px; }
}
@media (max-width: 520px) {
  .sheet { padding: 18px 16px; }
  .sidebar nav a { font-size: 13px; padding: 12px 8px; }
  .brand-sub { max-width: 210px; }
  .masthead .button { padding: 7px 9px; min-height: 38px; }
  .masthead .button svg { display: none; }
  h1 { font-size: 23px; }
  .metric-label, .metric-note { font-size: 12px; }
  .metric { padding: 13px 12px; }
  .panel-heading h2 { font-size: 16px; }
  .charts-row { gap: 18px; }
  .line-chart { width: calc(100% - 16px); margin: 8px 8px 0; min-height: 160px; }
  .chart-legend { padding: 0 16px; gap: 10px; }
  .line-chart text { font-size: 14px; }
  .filters input, .filters select { min-height: 40px; }
  .field-list > div { grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr); }
  .source-menu { grid-template-columns: 1fr; }
  .reserved-grid { gap: 20px; }
}

/* Keep the reference layout with more readable labels and active navigation. */
:root { --muted: #536981; }
.sidebar nav a[aria-current] { color: #c63250; }
.scope-note { color: #52667e; }
.metric-label, .filters label, .compact-control, thead th, .date-control { font-size: 13px; }
.metric-note, .panel-heading p, .row-sub, .list-status, .panel-note,
.chart-caption, .chart-legend, .delta, .source-footer { font-size: 13px; }
@media (max-width: 520px) {
  #note-list table { min-width: 760px; }
  .table-scroll table { min-width: 580px; }
  .row-title { min-width: 190px; }
  tbody th:first-child { min-width: 140px; }
  .table-empty { text-align: left; }
}
.page-heading .breadcrumb, .source-footer, .brand-sub { color: #536981; }
