:root {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #172842;
  background: #f3f6fb;
  font-synthesis: none;
  font-size: 14px;
  line-height: 1.55;
  --ink: #172842;
  --muted: #52637d;
  --light-muted: #64758c;
  --border: #e0e8f3;
  --surface: #fff;
  --blue: #1d56cf;
  --navy: #101c32;
  --green: #067565;
  --rose: #a73549;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(25px, 2.2vw, 33px); font-weight: 740; letter-spacing: -.035em; line-height: 1.23; }
h2 { font-size: 17px; font-weight: 710; letter-spacing: -.012em; }
h3 { font-size: 14px; font-weight: 700; }
small { color: var(--light-muted); font-size: 12px; }
code { color: #345475; font-size: .9em; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .65; }
:focus-visible { outline: 3px solid #719bf7; outline-offset: 2px; }
.skip { position: absolute; z-index: 9; transform: translateY(-150%); border-radius: 5px; padding: 8px 13px; background: white; }
.skip:focus { transform: translateY(0); }
.muted, .label-number { color: var(--muted); }
.small { font-size: 12px; }
.positive { color: var(--green); }
.negative { color: var(--rose); }
.num { font-variant-numeric: tabular-nums; text-align: right; }

.workspace { display: grid; min-height: 100vh; grid-template-columns: 218px minmax(0, 1fr); }
.sidebar {
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh;
  padding: 24px 16px 16px; background: var(--navy); color: #ced9ed;
}
.macro-brand { display: flex; align-items: center; gap: 11px; padding: 0 3px 30px; color: white; font-size: 15px; font-weight: 720; white-space: nowrap; }
.macro-brand:hover { color: #d9e7ff; text-decoration: none; }
.brand-mark {
  width: 31px; height: 31px; flex: 0 0 31px; display: inline-flex; align-items: flex-end; justify-content: center;
  gap: 3px; padding: 0 0 7px; border-radius: 8px; color: white; background: #2860de; box-shadow: 0 4px 12px #062b7960;
}
.brand-mark i { display: block; width: 3px; border-radius: 2px; background: currentColor; height: 8px; }
.brand-mark i:nth-child(2) { height: 12px; opacity: .85; }
.brand-mark i:nth-child(3) { height: 17px; opacity: .95; }
.menu { display: grid; gap: 6px; }
.menu a, .exit-link { display: flex; align-items: center; gap: 12px; color: #aebdd5; border-radius: 7px; padding: 10px 13px; white-space: nowrap; font-size: 13px; font-weight: 580; }
.menu a:hover, .exit-link:hover { background: #1c2f4b; color: white; text-decoration: none; }
.menu a[aria-current] { color: #ecf4ff; background: #244474; }
.nav-icon { position: relative; display: inline-block; flex: 0 0 16px; width: 16px; height: 16px; color: inherit; }
.nav-icon::before, .nav-icon::after { position: absolute; content: ""; }
.nav-icon.overview::before { inset: 2px; border: 1px solid; border-radius: 2px; }
.nav-icon.overview::after { inset: 2px 8px 2px 7px; background: currentColor; box-shadow: -4px 5px 0 -0.1px currentColor; clip-path: inset(0 0 0 -5px); opacity: .85; }
.nav-icon.trend::before { inset: 2px 1px 3px 2px; border: solid currentColor; border-width: 0 0 1px 1px; }
.nav-icon.trend::after { width: 9px; height: 6px; left: 6px; top: 3px; border: solid currentColor; border-width: 1px 1px 0 0; transform: skew(-24deg, -21deg); }
.nav-icon.flask::before { inset: 5px 3px 2px; border: 1px solid; border-radius: 5px 5px 2px 2px; }
.nav-icon.flask::after { width: 6px; height: 3px; top: 2px; left: 5px; border-top: 1px solid; border-bottom: 1px solid; }
.nav-icon.database::before { inset: 2px; border: 1px solid; border-radius: 3px / 2px; }
.nav-icon.database::after { width: 11px; height: 3px; top: 5px; left: 2.5px; border-bottom: 1px solid; border-radius: 50%; box-shadow: 0 3px 0 -0.3px currentColor; }
.nav-icon.file::before { inset: 1px 3px 2px; border: 1px solid; border-radius: 2px; }
.nav-icon.file::after { width: 5px; height: 1px; top: 6px; left: 6px; background: currentColor; box-shadow: 0 3px 0 currentColor; }
.sidebar-foot { margin-top: auto; }
.signed-in { display: flex; align-items: center; gap: 8px; margin: 13px 0 0; padding: 14px 4px 3px; border-top: 1px solid #26364e; color: #d6e1f0; font-size: 12px; }
.avatar { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #283e61; color: #d1e3ff; }
.signed-in form { margin-left: auto; }
.signed-in button { background: transparent; border: 0; color: #bac8dc; padding: 3px; }
.signed-in button:hover { color: white; }

.workspace-main { min-width: 0; width: 100%; }
.context-bar { background: white; border-bottom: 1px solid var(--border); }
.context-form {
  display: flex; align-items: flex-end; gap: clamp(10px, 1.4vw, 22px); max-width: 1700px; margin: 0 auto;
  padding: 14px clamp(18px, 2.7vw, 38px) 15px;
}
.context-target { display: grid; align-self: stretch; align-content: center; gap: 3px; min-width: 162px; border-right: 1px solid var(--border); padding-right: 17px; }
.context-target span, label, legend { color: #465976; font-size: 12px; font-weight: 630; }
.context-target strong { color: var(--ink); white-space: nowrap; font-size: 14px; }
.context-target small { margin-left: 3px; font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 550; }
.context-form label { width: auto; }
.context-form label small { display: inline; font-size: 10px; }
.context-form input, .context-form select { margin-top: 2px; min-height: 35px; padding: 5px 8px; font-size: 12px; }
.content { max-width: 1700px; margin: 0 auto; padding: 26px clamp(18px, 2.7vw, 38px) 28px; }
.page-head, .section-head, .panel-head, .chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-head { margin-bottom: 19px; }
.page-head p { color: var(--muted); margin-top: 6px; }
.section { margin-top: 20px; }
.section-head { margin-bottom: 10px; }
.text-link { font-size: 12px; font-weight: 620; }
.button {
  display: inline-flex; gap: 7px; min-height: 36px; justify-content: center; align-items: center; flex: 0 0 auto;
  padding: 7px 12px; border-radius: 6px; background: #fff; border: 1px solid #cbdaf0; color: var(--blue); font-weight: 650; font-size: 12px;
}
.button:hover { background: #f1f6ff; text-decoration: none; }
.button.primary { background: #225bda; border-color: #225bda; color: white; }
.button.primary:hover { background: #194ab8; border-color: #194ab8; }
.button.compact { min-height: 35px; }
.button.link-button { border-color: transparent; padding-left: 4px; padding-right: 4px; }
.notice { border: 1px solid #dce6f5; background: #eef4ff; color: #385577; padding: 9px 12px; border-radius: 7px; }
.notice.warning { background: #fff7e8; border-color: #f1dfb2; color: #81571b; }
.notice.mode-note { font-size: 12px; padding: 8px 12px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; min-width: 0; overflow: hidden; box-shadow: 0 1px 3px #10274806; }
.panel-head { padding: 15px 17px 11px; }
.panel-head p { color: var(--muted); margin-top: 3px; font-size: 12px; }
.panel-foot { border-top: 1px solid #edf1f7; padding: 11px 17px; font-size: 12px; }
.empty-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; text-align: center; color: var(--muted); min-height: 190px; padding: 18px; }
.empty-panel small { max-width: 40ch; }
.work-footer { color: var(--light-muted); font-size: 11px; max-width: 1700px; margin: 0 auto; padding: 0 clamp(18px, 2.7vw, 38px) 20px; }
.work-footer span { margin: 0 5px; }

.market-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.market-card { padding: 13px 14px 11px; min-width: 0; border-radius: 10px; background: #fff; border: 1px solid var(--border); color: var(--ink); box-shadow: 0 1px 3px #10274806; }
.market-card:hover { border-color: #a7c0ed; text-decoration: none; }
.market-head { display: flex; justify-content: space-between; align-items: center; gap: 5px; }
.market-head h3 { font-size: 13px; }
.market-head > span { color: #6984aa; }
.market-number { margin: 8px 0 1px; font-size: clamp(23px, 2.4vw, 31px); line-height: 1.1; font-weight: 730; font-variant-numeric: tabular-nums; }
.market-number small { font-weight: 520; font-size: 11px; }
.market-number.muted-number { color: #7689a4; }
.market-change { margin-top: 7px; font-size: 11px; font-variant-numeric: tabular-nums; }
.market-change span { color: var(--light-muted); }
.spark, .empty-spark { height: 32px; margin: 1px 0 2px; }
.empty-spark { display: grid; align-items: center; }
.empty-spark::after { content: ""; border-bottom: 1px dashed #e4eaf4; }
.market-source { border-top: 1px solid #eff3f8; padding-top: 7px; min-height: 23px; color: var(--light-muted); font-size: 11px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(260px, 1fr); gap: 12px; }
.chart { width: 100%; height: 285px; }
.chart.tall { height: 295px; }
.chart .chart-empty { display: grid; height: 100%; place-items: center; color: var(--light-muted); font-size: 13px; }
.chart-head { padding: 10px 17px 2px; }
.segment { display: inline-flex; padding: 2px; border: 1px solid #e2eafa; border-radius: 7px; background: #f4f7fc; }
.segment button { min-height: 28px; min-width: 53px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 11px; }
.segment button[aria-pressed=true] { color: #1e52bd; background: white; font-weight: 650; box-shadow: 0 1px 3px #1d3f7820; }
.forecast-peek { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 5px 17px 14px; }
.peek-item { min-width: 0; display: grid; gap: 4px; padding: 12px; border-radius: 8px; border: 1px solid #e5edf9; background: #f8faff; }
.peek-item > span { color: #4a6080; font-size: 12px; }
.peek-item strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.peek-item a { font-size: 11px; font-weight: 650; }
.overview-last { border-top: 1px solid #edf1f7; padding: 12px 17px; display: grid; gap: 4px; }
.overview-last span { font-size: 11px; color: var(--muted); }
.overview-last a { font-weight: 640; }
.health-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 17px 15px; }
.health-grid a { padding: 8px; border: 1px solid #ebf0f7; border-radius: 7px; display: flex; gap: 7px; align-items: center; justify-content: space-between; color: var(--ink); }
.health-grid strong { font-size: 11px; }
.health-grid small { display: block; font-size: 10px; }
.status { display: inline-flex; align-items: center; gap: 5px; color: #395879; background: #edf2fa; border-radius: 25px; padding: 3px 7px; white-space: nowrap; font-weight: 610; font-size: 10px; }
.status::before { content: ""; flex: 0 0 4px; width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.status.good { color: #06634f; background: #e4f5ef; }
.status.bad { color: #9c3e4c; background: #fff0f1; }
.status.attention { color: #865728; background: #fbf1df; }

.indicator-grid { display: grid; grid-template-columns: 193px minmax(0, 1fr) 217px; gap: 12px; align-items: start; }
.forecast-grid { display: grid; grid-template-columns: minmax(255px, .78fr) minmax(0, 2.1fr); gap: 12px; align-items: start; }
.research-results { display: grid; gap: 12px; min-width: 0; }
.inner-form { padding: 3px 17px 15px; }
.inner-copy { color: var(--muted); padding: 0 17px 14px; }
.inner-copy p + p, .inner-copy h3 + p { margin-top: 5px; }
.inner-copy h3 { color: var(--ink); }
.stacked { display: grid; gap: 10px; }
label { display: block; min-width: 0; }
input:not([type=checkbox]), textarea, select {
  display: block; width: 100%; min-width: 0; min-height: 36px; margin-top: 4px; padding: 6px 9px;
  border: 1px solid #ccd8e9; border-radius: 6px; background: white; color: var(--ink);
}
input[type=file] { font-size: 11px; }
input[type=checkbox] { accent-color: #225bda; width: 15px; height: 15px; flex: 0 0 15px; margin: 0; }
textarea { resize: vertical; }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
legend { margin-bottom: 6px; }
.checklist { display: grid; gap: 2px; }
.checklist label { display: flex; align-items: center; gap: 6px; padding: 5px 4px; border-radius: 5px; color: #293c58; font-weight: 570; }
.checklist label:has(input:checked) { background: #eaf1ff; color: #1d4bac; }
.checklist label small { display: block; font-size: 9px; }
.checklist.horizontal { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-bottom: 10px; }
.check-label { display: flex; align-items: center; gap: 7px; }
.field-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: flex-end; }
.actions > span { align-self: center; }
.form-feedback { width: 100%; color: #1d5976; padding: 8px 9px; background: #e8f4fc; border-radius: 6px; font-size: 12px; white-space: pre-line; }
.form-feedback.failure { background: #fff1ee; color: #9b3429; }
.definition-list { margin: 12px 0 0; font-size: 12px; }
.definition-list dt { font-weight: 660; color: var(--ink); }
.definition-list dd { margin: 2px 0 13px; }
.definition-list dd a { display: block; margin-top: 3px; }
.section-divider { padding-top: 11px; border-top: 1px solid #e9eef6; }
.relationship-meta { display: grid; gap: 3px; padding: 2px 17px 7px; color: var(--muted); font-size: 12px; }
.relationship-meta strong { color: var(--ink); }
.contents-inset { margin: 7px 17px 12px; }
.details-block { border-top: 1px solid #ecf0f7; }
.details-block > summary { padding: 12px 17px; }
summary { cursor: pointer; font-size: 13px; font-weight: 650; color: #26476d; }
.subtable { padding: 3px 0 9px; }
.subtable h3 { margin: 4px 17px 6px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 12px; background: #fff; }
th, td { border-bottom: 1px solid #eaf0f8; padding: 8px 11px; vertical-align: middle; line-height: 1.4; }
th:first-child, td:first-child { padding-left: 17px; }
th:last-child, td:last-child { padding-right: 17px; }
thead th { white-space: nowrap; background: #f3f6fc; color: #455b78; font-weight: 640; }
tbody th { font-weight: 630; }
td small, th small { display: block; margin-top: 2px; font-size: 10px; }
tr:last-child td, tr:last-child th { border-bottom: 0; }
tr.selected-row { background: #f0f5ff; }
.empty-cell { color: var(--muted); padding-top: 17px; padding-bottom: 17px; }
.source-error { color: #985340; }
.result-context { display: flex; flex-wrap: wrap; gap: 5px 15px; border-top: 1px solid #edf1f7; background: #f9fbfe; padding: 8px 17px; font-size: 11px; color: var(--muted); }
.result-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 11px 17px 0; gap: 7px; }
.result-stats > div { display: grid; gap: 4px; border: 1px solid #e4edf9; background: #f8faff; border-radius: 7px; padding: 8px; }
.result-stats span { color: var(--muted); font-size: 11px; }
.result-stats strong { font-size: 23px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.result-stats strong.label-number { font-size: 17px; }
.result-stats small { font-size: 10px; }
.kv { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 7px 12px; }
.kv dt { font-weight: 620; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.evaluation-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 5px 0; }
.data-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.inline-disclosure > summary { display: list-item; margin: 15px 17px 5px; font-size: 17px; font-weight: 710; color: var(--ink); }
.field-mapping { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.link-list { padding-left: 16px; margin: 6px 0 0; font-size: 12px; }
.inline-tag { display: inline-block; margin: 5px 6px 0 0; padding: 3px 6px; border-radius: 6px; background: #ebf2ff; font-size: 11px; }
.report-text { padding-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-form { max-width: 850px; }
.archive-filter label { min-width: 125px; }
.access-main {
  display: grid; justify-items: center; align-content: center; min-height: 100dvh; padding: 24px;
  background: radial-gradient(ellipse at 35% 20%, #1e3663, #101c32 65%);
}
.access-card { max-width: 100%; width: 410px; background: #fff; border-radius: 13px; padding: 25px 31px 31px; box-shadow: 0 12px 62px #06112755; }
.access-card h1 { margin-top: 8px; font-size: 27px; }
.access-card p { margin: 9px 0 15px; color: var(--muted); }
.access-mark { margin-top: 18px; }
.access-form { display: grid; gap: 12px; }
.access-back { font-size: 12px; font-weight: 650; }

@media (max-width: 1250px) {
  .workspace { grid-template-columns: 190px minmax(0, 1fr); }
  .indicator-grid { grid-template-columns: 178px minmax(0, 1fr); }
  .indicator-notes { grid-column: 2; }
  .health-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 940px) {
  .workspace { grid-template-columns: 157px minmax(0, 1fr); }
  .sidebar { padding: 17px 9px 12px; }
  .macro-brand { font-size: 12px; gap: 6px; }
  .context-form { flex-wrap: wrap; }
  .context-target { border: 0; min-width: 141px; padding: 0; }
  .market-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .overview-grid, .forecast-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .workspace { display: block; }
  .sidebar { position: static; height: auto; padding: 10px 12px 9px; gap: 9px; }
  .macro-brand { padding: 0; font-size: 14px; }
  .brand-mark { width: 26px; height: 26px; flex-basis: 26px; padding-bottom: 5px; }
  .menu { display: flex; gap: 3px; flex-wrap: wrap; }
  .menu a { padding: 6px 7px; gap: 4px; font-size: 11px; }
  .menu .nav-icon { display: none; }
  .sidebar-foot { display: flex; gap: 8px; justify-content: space-between; }
  .exit-link, .signed-in { margin: 0; border: 0; padding: 0 4px; font-size: 11px; }
  .signed-in .avatar { display: none; }
  .context-form { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); padding: 9px 12px; gap: 5px 8px; }
  .context-form label { min-width: 0; }
  .context-target { grid-column: span 2; align-items: baseline; display: flex; gap: 7px; }
  .context-form input, .context-form select { font-size: 12px; }
  .context-form .button { justify-self: end; }
  .content { padding: 17px 12px; }
  .page-head { align-items: flex-start; }
  .page-head p { font-size: 12px; }
  .page-head .button { flex: 0 0 auto; font-size: 11px; white-space: nowrap; }
  .market-grid { gap: 7px; }
  .market-card { padding: 8px 9px; }
  .market-head h3 { font-size: 11px; }
  .chart, .chart.tall { height: 235px; }
  .indicator-grid, .data-actions { grid-template-columns: minmax(0,1fr); }
  .indicator-notes { grid-column: auto; }
  .indicator-picker .checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-grid a { flex-wrap: wrap; }
  .panel-head, .panel-foot, .inner-form, .inner-copy { padding-inline: 10px; }
  .result-stats { margin-inline: 8px; gap: 4px; }
  .result-stats strong { font-size: 18px; }
  .work-footer { padding-inline: 12px; }
}
