:root {
  --ink: #17231e;
  --muted: #748079;
  --line: #e7ebe8;
  --paper: #ffffff;
  --wash: #f6f8f6;
  --green: #176a4b;
  --green-2: #2e8764;
  --green-soft: #eaf5ef;
  --mint: #cfe9da;
  --orange: #c87132;
  --orange-soft: #fbf1e9;
  --red: #b64b45;
  --shadow: 0 10px 35px rgba(24, 55, 41, .055);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 224px;
  flex-direction: column;
  padding: 25px 18px 20px;
  color: #dce8e1;
  background:
    radial-gradient(circle at 50% 10%, rgba(66, 131, 98, .25), transparent 30%),
    linear-gradient(180deg, #102e23 0%, #0d281f 100%);
  transition: transform .25s ease;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 28px; color: #fff; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; background: rgba(255,255,255,.08); }
.brand-mark svg { width: 28px; fill: none; stroke: #8ed0aa; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand strong { display: block; font-family: "Songti SC", STSong, serif; font-size: 18px; letter-spacing: .1em; }
.brand small { display: block; margin-top: 2px; color: #7da891; font-size: 8px; letter-spacing: .2em; }
.nav-list { display: grid; gap: 6px; }
.nav-item { position: relative; display: flex; width: 100%; align-items: center; gap: 12px; min-height: 43px; padding: 0 13px; border: 0; border-radius: 11px; color: #a9bcb1; background: transparent; cursor: pointer; text-align: left; transition: .2s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: rgba(120, 196, 154, .14); }
.nav-item.active::before { position: absolute; left: -18px; width: 3px; height: 22px; border-radius: 0 4px 4px 0; background: #75c49a; content: ""; }
.nav-icon { display: grid; width: 20px; place-items: center; color: #75c49a; font-size: 18px; line-height: 1; }
.nav-count { margin-left: auto; min-width: 22px; padding: 2px 6px; border-radius: 20px; color: #cce4d7; background: rgba(255,255,255,.08); font-size: 11px; text-align: center; }
.sidebar-divider { height: 1px; margin: 20px 10px; background: rgba(255,255,255,.08); }
.nav-caption { padding: 0 13px 8px; color: #5f8874; font-size: 10px; letter-spacing: .16em; }
.source-card { margin-top: auto; padding: 14px; border: 1px solid rgba(132, 192, 162, .15); border-radius: 12px; background: rgba(255,255,255,.04); }
.source-head { display: flex; align-items: center; gap: 7px; color: #a6c7b5; font-size: 11px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #56bd82; box-shadow: 0 0 0 4px rgba(86,189,130,.12); }
.source-card strong { display: block; margin-top: 10px; color: #eaf4ee; font-size: 12px; font-weight: 600; }
.source-card small { display: block; margin-top: 4px; color: #6f9884; font-size: 10px; }

.page-wrap { min-height: 100vh; margin-left: 224px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; height: 72px; align-items: center; justify-content: space-between; gap: 24px; padding: 0 34px; border-bottom: 1px solid rgba(220,226,222,.85); background: rgba(255,255,255,.92); backdrop-filter: blur(16px); }
.mobile-menu { display: none; border: 0; background: none; font-size: 20px; }
.search-wrap { position: relative; display: flex; width: min(460px, 45vw); align-items: center; }
.search-icon { position: absolute; left: 14px; z-index: 1; color: #6a766f; font-size: 23px; transform: rotate(-20deg); }
.search-wrap input { width: 100%; height: 40px; padding: 0 66px 0 42px; border: 1px solid var(--line); outline: 0; border-radius: 10px; color: var(--ink); background: #f8faf8; transition: .2s; }
.search-wrap input:focus { border-color: #86b7a0; background: #fff; box-shadow: 0 0 0 3px rgba(46,135,100,.08); }
.search-wrap kbd { position: absolute; right: 11px; padding: 3px 7px; border: 1px solid #dde3df; border-radius: 5px; color: #8a948e; background: #fff; font-size: 10px; box-shadow: 0 1px 0 #dfe4e1; }
.search-results { position: absolute; top: 48px; right: 0; left: 0; overflow: hidden; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 16px 42px rgba(20,45,34,.14); }
.search-result { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 8px; background: #fff; cursor: pointer; text-align: left; }
.search-result:hover { background: var(--green-soft); }
.search-result i { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 8px; color: #fff; background: var(--green); font-style: normal; }
.search-result span { display: grid; }
.search-result strong { font-size: 13px; }
.search-result small { color: var(--muted); font-size: 10px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.data-badge { display: flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid #dbeae1; border-radius: 20px; color: #3e7058; background: #f5faf7; font-size: 11px; }
.data-badge span { width: 6px; height: 6px; border-radius: 50%; background: #43a66e; }
.icon-btn { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: #718079; background: #fff; cursor: pointer; }
.avatar { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; color: #e5f2eb; background: #1e6047; font-family: "Songti SC", serif; cursor: default; }

main { width: min(1480px, 100%); margin: 0 auto; padding: 28px 34px 24px; }
.section-anchor { scroll-margin-top: 92px; }
.company-hero { margin-bottom: 20px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; color: #87918b; font-size: 11px; }
.breadcrumbs b { color: #ccd2ce; font-weight: 400; }
.breadcrumbs strong { color: #58655e; }
.company-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 19px; }
.company-title-wrap { display: flex; align-items: center; gap: 15px; }
.company-logo { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid rgba(29,106,76,.12); border-radius: 15px; color: #fff; background: linear-gradient(145deg, #2d8261, #15563f); box-shadow: 0 8px 22px rgba(23,106,75,.18); font-family: "Songti SC", serif; font-size: 24px; }
.title-line { display: flex; align-items: center; gap: 10px; }
h1, h2, p { margin: 0; }
h1 { font-family: "Songti SC", STSong, serif; font-size: 27px; letter-spacing: .03em; }
.stock-code { padding-left: 10px; border-left: 1px solid #d9dfdb; color: #7c8881; font: 500 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.tag { padding: 3px 7px; border-radius: 5px; color: #3a7a59; background: var(--green-soft); font-size: 10px; }
.company-title-wrap p { margin-top: 7px; color: var(--muted); font-size: 12px; }
.hero-actions { display: flex; gap: 9px; }
.primary-btn, .secondary-btn { height: 38px; padding: 0 15px; border-radius: 9px; cursor: pointer; transition: .2s; }
.primary-btn { border: 1px solid var(--green); color: #fff; background: var(--green); }
.primary-btn:hover { background: #0e573d; transform: translateY(-1px); }
.primary-btn.following { color: var(--green); background: #fff; }
.secondary-btn { border: 1px solid #dce3df; color: #44544b; background: #fff; }
.secondary-btn:hover { border-color: #9eb9aa; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 19px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; color: #7f8a84; background: #fff; font-size: 10px; }
.hero-meta span { position: relative; }
.hero-meta span:not(:first-child)::before { position: absolute; left: -12px; color: #d7ddd9; content: "·"; }
.hero-meta i { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: #52ad79; }
.hero-meta b { color: #456356; }
.meta-source { margin-left: auto; }

.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.metric-card { position: relative; overflow: hidden; min-height: 150px; padding: 17px 16px 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: 0 3px 12px rgba(21,55,40,.025); }
.metric-card.featured { border-color: #d8e9df; background: linear-gradient(145deg, #fff 55%, #f2f8f4); }
.metric-label { color: #748079; font-size: 11px; }
.info-dot { width: 15px; height: 15px; padding: 0; border: 1px solid #cbd4cf; border-radius: 50%; color: #88938d; background: none; font: 9px serif; }
.metric-main { display: flex; align-items: baseline; gap: 5px; margin-top: 18px; }
.metric-main strong { font: 600 26px/1 ui-monospace, SFMono-Regular, Menlo, sans-serif; letter-spacing: -.04em; }
.metric-main span { color: #87918b; font-size: 10px; }
.metric-foot { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.metric-foot small { color: #939c97; font-size: 9px; }
.change { display: inline-flex; align-items: center; padding: 2px 5px; border-radius: 4px; font-size: 9px; }
.change.up { color: #21734f; background: #eaf6ef; }
.change.neutral { color: #4f7462; background: #eef5f1; }
.change.warn { color: #ad622e; background: #fbefe6; }
.sparkline { position: absolute; right: 0; bottom: 0; width: 90px; height: 45px; opacity: .8; }
.sparkline svg { width: 100%; height: 100%; }
.mini-progress { overflow: hidden; height: 3px; margin-top: 14px; border-radius: 5px; background: #eef2ef; }
.mini-progress span { display: block; height: 100%; border-radius: inherit; background: var(--green-2); transition: width .4s ease; }
.mini-progress.muted span { background: #87aa98; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); gap: 14px; margin-bottom: 14px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.chart-panel, .quality-panel, .reports-panel, .source-panel { padding: 21px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.panel-head h2 { font-family: "Songti SC", STSong, serif; font-size: 17px; }
.panel-head p { margin-top: 5px; color: #8b948f; font-size: 10px; }
.segmented { display: flex; padding: 3px; border-radius: 8px; background: #f1f4f2; }
.segmented button { min-width: 48px; height: 27px; padding: 0 10px; border: 0; border-radius: 6px; color: #7b8680; background: transparent; font-size: 10px; cursor: pointer; }
.segmented button.active { color: #294d3d; background: #fff; box-shadow: 0 1px 5px rgba(25,55,42,.1); }
.legend { display: flex; align-items: center; gap: 20px; margin-top: 20px; color: #6f7c75; font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; }
.legend-bar { width: 9px; height: 9px; border-radius: 2px; background: #cfe7da; }
.legend-line { width: 13px; height: 2px; background: var(--green); }
.legend em { margin-left: auto; color: #9ca49f; font-style: normal; }
.chart-wrap { min-height: 260px; margin: 5px -6px 0; }
.chart-wrap svg { display: block; width: 100%; height: 270px; overflow: visible; }
.chart-wrap .gridline { stroke: #edf0ee; stroke-width: 1; }
.chart-wrap .axis-label { fill: #929b96; font-size: 9px; }
.chart-wrap .bar { fill: #d4eade; transition: .25s; }
.chart-wrap .bar:hover { fill: #b9ddca; }
.chart-wrap .line { fill: none; stroke: #176a4b; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart-wrap .area { fill: url(#lineFade); }
.chart-wrap .point { fill: white; stroke: #176a4b; stroke-width: 2; }
.chart-wrap .value-label { fill: #4e5c55; font-size: 9px; font-weight: 600; }
.chart-note { display: flex; align-items: center; gap: 7px; padding-top: 11px; border-top: 1px solid #eef1ef; color: #86918b; font-size: 9px; }
.chart-note .status-dot { width: 5px; height: 5px; }
.score-badge { padding: 4px 8px; border-radius: 15px; color: #347055; background: var(--green-soft); font-size: 10px; }
.quality-score { display: grid; grid-template-columns: 105px 1fr; align-items: center; gap: 14px; margin: 26px 0 24px; }
.score-ring { display: grid; width: 100px; height: 100px; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) 0 82%, #edf2ef 82%); transition: background .4s; }
.score-ring::before { position: absolute; width: 78px; height: 78px; border-radius: 50%; background: #fff; content: ""; }
.score-ring span { position: relative; text-align: center; }
.score-ring strong { display: block; color: var(--green); font: 600 24px ui-monospace, monospace; }
.score-ring small { color: #a1aaa5; font-size: 9px; }
.quality-score > div:last-child strong { display: block; font-size: 12px; line-height: 1.5; }
.quality-score p { margin-top: 7px; color: #8c9690; font-size: 9px; line-height: 1.7; }
.quality-list { display: grid; gap: 14px; }
.quality-list > div { display: grid; grid-template-columns: 66px 25px 1fr; align-items: center; gap: 8px; color: #718079; font-size: 10px; }
.quality-list b { color: #43564c; font: 500 10px ui-monospace, monospace; text-align: right; }
.quality-list i { overflow: hidden; height: 4px; border-radius: 6px; background: #edf1ef; }
.quality-list em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #79ba97, #1e7553); transition: width .4s; }

.compare-panel { margin-bottom: 14px; padding: 21px 21px 8px; }
.text-btn { border: 0; color: var(--green); background: transparent; font-size: 10px; cursor: pointer; }
.text-btn:hover span { display: inline-block; transform: translateX(3px); }
.table-wrap { overflow-x: auto; margin-top: 16px; }
.compare-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.compare-table th { padding: 10px 13px; border-bottom: 1px solid var(--line); color: #8b958f; background: #fafbfa; font-size: 9px; font-weight: 500; text-align: right; }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; }
.compare-table td { padding: 14px 13px; border-bottom: 1px solid #edf0ee; color: #536159; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table tr.selected { background: #f5faf7; }
.company-cell { display: flex; align-items: center; gap: 9px; font-family: Inter, "PingFang SC", sans-serif; }
.company-mini-logo { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; color: #fff; background: #326e54; font-family: "Songti SC", serif; }
.company-cell span { display: grid; }
.company-cell strong { color: #24372e; font-size: 11px; }
.company-cell small { margin-top: 2px; color: #98a09c; font: 8px ui-monospace, monospace; }
.table-pill { display: inline-block; padding: 3px 7px; border-radius: 12px; color: #27714f; background: #eaf6ef; font: 9px Inter, sans-serif; }
.table-pill.orange { color: #9e5e31; background: #fbf0e8; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(340px, .72fr); gap: 14px; }
.report-list { margin-top: 16px; }
.report-item { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 13px; padding: 13px 6px; border-bottom: 1px solid #edf0ee; }
.report-item:last-child { border-bottom: 0; }
.pdf-icon { position: relative; display: grid; width: 38px; height: 42px; place-items: end center; padding-bottom: 6px; border: 1px solid #e1e6e3; border-radius: 7px; color: var(--red); background: #fafbfa; font-size: 8px; font-weight: 700; }
.pdf-icon::before { position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 0 8px 8px; border-color: transparent transparent #e6ebe8 transparent; content: ""; }
.report-info strong { display: block; color: #33463c; font-size: 11px; font-weight: 600; }
.report-info p { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 6px; color: #909994; font-size: 9px; }
.report-info .report-type { color: #397559; }
.report-link { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid #e0e6e2; border-radius: 8px; color: #4b6d5b; background: #fff; transition: .2s; }
.report-link:hover { border-color: #82ad97; background: var(--green-soft); transform: translateY(-1px); }
.verified-badge { color: #3a7659; font-size: 10px; }
.pipeline { margin-top: 22px; }
.pipeline-step { display: grid; grid-template-columns: 29px 1fr 18px; align-items: center; gap: 10px; }
.pipeline-step > span { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; color: #4e8067; background: var(--green-soft); font: 9px ui-monospace, monospace; }
.pipeline-step strong { display: block; color: #3f4f46; font-size: 10px; }
.pipeline-step small { display: block; margin-top: 3px; color: #97a09b; font-size: 8px; }
.pipeline-step b { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; color: #fff; background: #58a77b; font-size: 8px; }
.pipeline-line { width: 1px; height: 16px; margin: 3px 0 3px 14px; background: #dce9e1; }
.source-tip { display: flex; gap: 9px; margin-top: 22px; padding: 11px; border-radius: 9px; color: #65756c; background: #f5f8f6; }
.source-tip > span { display: grid; flex: 0 0 18px; height: 18px; place-items: center; border: 1px solid #9eb9aa; border-radius: 50%; color: #5f866f; font: 10px serif; }
.source-tip p { font-size: 9px; line-height: 1.7; }
.source-tip strong { color: #486151; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 27px 3px 5px; color: #9ba39f; font-size: 9px; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 330px; padding: 11px 15px; border-radius: 10px; color: #fff; background: #173d2e; box-shadow: 0 12px 35px rgba(8,38,25,.22); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  .page-wrap { margin-left: 0; }
  .mobile-menu { display: block; }
  .topbar { padding: 0 18px; }
  .data-badge { display: none; }
  main { padding: 22px 18px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .hero-meta .meta-source { margin-left: 0; }
}
@media (max-width: 620px) {
  .topbar { gap: 10px; }
  .search-wrap { width: auto; flex: 1; }
  .search-wrap kbd, .icon-btn { display: none; }
  .company-heading { align-items: flex-start; }
  .company-title-wrap { align-items: flex-start; }
  .title-line { flex-wrap: wrap; }
  .hero-actions { display: grid; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card { min-height: 135px; }
  .metric-main strong { font-size: 22px; }
  .quality-score { grid-template-columns: 90px 1fr; }
  .score-ring { width: 85px; height: 85px; }
  .score-ring::before { width: 65px; height: 65px; }
  .reports-head { flex-direction: column; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
