:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #d9e0ea;
  --line-soft: #edf1f6;
  --sidebar: #101827;
  --sidebar-soft: #172338;
  --blue: #2563eb;
  --teal: #0f766e;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
  --purple: #7c3aed;
  --cyan: #0891b2;
  --shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  background: #f8fafc;
  color: #1e293b;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: .92em;
  padding: 1px 5px;
}

.app-shell {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 20px;
  min-height: 100vh;
  padding: 24px;
}

.sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  min-height: calc(100vh - 48px);
  border-radius: 8px;
  background: var(--sidebar);
  color: #f8fafc;
  padding: 22px 18px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #f59e0b;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  line-height: 1.18;
}

.brand small {
  margin-top: 4px;
  color: #a9b4c7;
  font-size: 12px;
}

.side-nav {
  display: grid;
  gap: 7px;
}

.side-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  border-radius: 8px;
  color: #dbe5f3;
  font-size: 14px;
  padding: 0 12px;
}

.side-link::after {
  content: "";
  position: absolute;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #64748b;
}

.side-link.active {
  background: #1f2f47;
  color: #ffffff;
  box-shadow: inset 3px 0 0 #f59e0b;
}

.side-link.active::after {
  background: #f59e0b;
}

.side-panel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .28);
}

.side-label {
  margin-bottom: 10px;
  color: #93a4bd;
  font-size: 12px;
  font-weight: 800;
}

.source-summary {
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.65;
}

.theme-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  min-height: 28px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 999px;
  background: rgba(148, 163, 184, .15);
  color: #e2e8f0;
  cursor: pointer;
  font-size: 12px;
  padding: 0 10px;
}

.filter-chip.active {
  border-color: #f59e0b;
  background: #f59e0b;
  color: #111827;
  font-weight: 900;
}

.side-note {
  margin-top: 26px;
  border-radius: 8px;
  background: var(--sidebar-soft);
  color: #c7d2fe;
  font-size: 13px;
  line-height: 1.75;
  padding: 14px;
}

.main {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.topbar,
.panel,
.control-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  padding: 18px 22px;
}

.plugin-upgrade-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  box-shadow: var(--shadow);
  color: #1e3a8a;
  padding: 12px 14px;
}

.plugin-upgrade-banner strong {
  color: #1d4ed8;
  font-size: 14px;
}

.plugin-upgrade-banner span {
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
}

.plugin-upgrade-banner a {
  border: 1px solid #93c5fd;
  border-radius: 8px;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 10px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(27px, 3.4vw, 40px);
  line-height: 1.24;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.3;
}

.subtle {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pill-button,
.icon-button,
.wide-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-weight: 800;
  padding: 0 14px;
}

.pill-button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.section-anchor {
  scroll-margin-top: 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, .8fr);
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 20px;
}

.lead-panel p {
  max-width: 840px;
  color: #475569;
  font-size: 15px;
  line-height: 1.8;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.metric {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
}

.metric strong {
  display: block;
  color: #0f172a;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head span {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 12px;
}

.framework-list {
  display: grid;
  gap: 13px;
}

.framework-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 11px;
}

.framework-row strong {
  color: #334155;
  font-size: 13px;
}

.bar-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #e6ebf2;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.framework-row span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.method-note {
  margin-top: 18px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  line-height: 1.7;
  padding: 13px;
}

.control-strip {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 220px auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
}

.search-box,
.select-box {
  display: grid;
  gap: 7px;
}

.search-box span,
.select-box span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  padding: 0 12px;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.theme-matrix {
  display: grid;
  gap: 12px;
}

.theme-row {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 12px;
}

.theme-name {
  color: #263445;
  font-size: 13px;
  font-weight: 900;
}

.theme-value {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.theme-map {
  display: grid;
  gap: 0;
}

.theme-map-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  padding: 11px 0;
}

.theme-map-row:last-child {
  border-bottom: 0;
}

.theme-map-row strong {
  font-size: 13px;
}

.theme-map-row p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
}

.timeline-list,
.company-list,
.record-list,
.resource-list {
  display: grid;
  gap: 10px;
}

.stock-layout {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.stock-browser,
.stock-detail {
  min-width: 0;
}

.stock-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 9px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.stock-card {
  min-height: 76px;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.stock-card:hover {
  border-color: #b8c7dc;
  background: #f8fafc;
}

.stock-card.active {
  border-color: var(--blue);
  box-shadow: inset 3px 0 0 var(--blue);
}

.stock-card strong {
  display: block;
  margin-bottom: 7px;
  color: #111827;
  font-size: 14px;
}

.stock-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.stock-detail {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.stock-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.stock-detail-head h4 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 20px;
}

.stock-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.stock-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.stock-stat {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.stock-stat strong {
  display: block;
  font-size: 20px;
  line-height: 1;
}

.stock-stat span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.stock-history {
  display: grid;
  gap: 9px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.stock-history-item {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 11px;
}

.stock-history-time {
  margin-bottom: 6px;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

.stock-history-text {
  color: #334155;
  font-size: 12px;
  line-height: 1.65;
}

.stock-page-grid {
  display: grid;
  grid-template-columns: minmax(330px, .42fr) minmax(0, .58fr);
  gap: 16px;
  align-items: start;
}

.resource-controls {
  grid-template-columns: minmax(280px, 1fr) 220px 160px auto;
}

.resource-page-grid {
  display: grid;
  grid-template-columns: minmax(320px, .42fr) minmax(0, .58fr);
  gap: 16px;
  align-items: start;
}

.stock-list-panel {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.stock-grid.large {
  max-height: calc(100vh - 150px);
}

.profile-detail {
  min-height: 720px;
}

.profile-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 18px;
  margin-bottom: 16px;
}

.profile-hero h2 {
  margin-bottom: 8px;
}

.profile-hero p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.profile-count {
  min-width: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  text-align: center;
}

.profile-count strong {
  display: block;
  color: #0f172a;
  font-size: 30px;
  line-height: 1;
}

.profile-count span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.profile-section {
  border-top: 1px solid var(--line-soft);
  margin-top: 16px;
  padding-top: 16px;
}

.profile-section:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.profile-section h3,
.analysis-card h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.profile-section p,
.analysis-card p,
.analysis-card li {
  color: #334155;
  font-size: 14px;
  line-height: 1.75;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.analysis-card {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.analysis-card ul {
  margin: 0;
  padding-left: 18px;
}

.analysis-card li + li {
  margin-top: 7px;
}

.badge-list.left {
  justify-content: flex-start;
}

.signal-line {
  margin-top: 8px;
}

.sector-collection-section {
  border-top-color: #dbeafe;
}

.sector-collection-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.sector-map-card,
.sector-theme-panel {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.sector-map-card {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.sector-map-title,
.sector-subhead {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 10px;
}

.sector-subhead.small {
  margin-top: 12px;
  margin-bottom: 8px;
}

.sector-subhead.peers {
  margin-top: 14px;
}

.sector-map-row {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 32px;
  padding-bottom: 10px;
}

.sector-map-row:last-child {
  min-height: 0;
  padding-bottom: 0;
}

.sector-map-row span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.sector-map-row strong {
  color: #111827;
  font-size: 13px;
  line-height: 1.55;
}

.sector-map-row i {
  position: absolute;
  left: 47px;
  top: 21px;
  bottom: 2px;
  width: 1px;
  background: #cbd5e1;
}

.sector-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sector-chip-card {
  border: 1px solid color-mix(in srgb, var(--theme-color), #ffffff 68%);
  border-left: 4px solid var(--theme-color);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.sector-chip-card strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
}

.sector-chip-card span {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
}

.sector-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sector-signal {
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 9px;
}

.sector-peer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sector-peer-card {
  display: block;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  padding: 11px;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.sector-peer-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}

.sector-peer-card strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.35;
}

.sector-peer-card span,
.sector-peer-card em {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.panel-head.compact {
  margin-bottom: 10px;
}

.profile-history {
  display: grid;
  gap: 10px;
}

.profile-history-item {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 13px;
  position: relative;
}

.profile-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.profile-history-head strong {
  color: #111827;
  font-size: 14px;
}

.profile-history-head span {
  color: var(--muted);
  font-size: 12px;
}

.profile-history-text {
  color: #334155;
  font-size: 13px;
  line-height: 1.75;
}

.stock-name-highlight {
  border-radius: 4px;
  background: #e8f1ff;
  color: #0f3b82;
  font-weight: 800;
  padding: 0 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.history-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.history-images a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fafc;
}

.history-images img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.sector-page-grid {
  display: grid;
  grid-template-columns: minmax(300px, .34fr) minmax(0, .66fr);
  gap: 16px;
  align-items: start;
}

.sector-overview-panel {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  margin-bottom: 16px;
  padding: 16px;
}

.sector-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.sector-overview-head h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 22px;
}

.sector-overview-head p:last-child {
  max-width: 760px;
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.7;
}

.overview-focus {
  min-width: 250px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 12px;
}

.overview-focus span {
  display: block;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}

.overview-focus strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.45;
}

.sector-overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.sector-overview-metrics div {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.sector-overview-metrics strong {
  display: block;
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
}

.sector-overview-metrics span {
  display: block;
  margin-top: 7px;
  color: #64748b;
  font-size: 12px;
}

.sector-overview-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.sector-lane-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lane-block {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.lane-block h3,
.sector-top-rank h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 14px;
}

.lane-block > div {
  display: grid;
  gap: 7px;
}

.lane-node,
.rank-node {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
}

.lane-node {
  padding: 9px 10px;
}

.lane-node:hover,
.rank-node:hover,
.lane-node.active {
  border-color: #93c5fd;
  background: #f8fbff;
}

.lane-node.active {
  box-shadow: inset 3px 0 0 var(--blue);
}

.lane-node strong {
  display: block;
  color: #111827;
  font-size: 13px;
  line-height: 1.35;
}

.lane-node span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
}

.sector-top-rank {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.rank-node {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 8px;
  padding: 10px;
}

.rank-node em {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.rank-node strong,
.rank-node small {
  display: block;
}

.rank-node strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.4;
}

.rank-node small {
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.sector-list-panel {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.sector-list {
  display: grid;
  gap: 9px;
  max-height: calc(100vh - 150px);
  overflow: auto;
  padding-right: 4px;
}

.sector-card {
  min-height: 96px;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.sector-card:hover {
  border-color: #b8c7dc;
  background: #f8fafc;
}

.sector-card.active {
  border-color: var(--blue);
  box-shadow: inset 3px 0 0 var(--blue);
}

.sector-card strong {
  display: block;
  margin-bottom: 7px;
  color: #111827;
  font-size: 15px;
}

.sector-card > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.sector-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.sector-score-row span {
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
}

.sector-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 16px;
  padding-bottom: 18px;
}

.sector-hero h2 {
  margin-bottom: 10px;
}

.sector-hero p:last-child {
  max-width: 820px;
  margin-bottom: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.75;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.score-card {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 13px;
}

.score-card strong {
  display: block;
  color: #0f172a;
  font-size: 25px;
  line-height: 1;
}

.score-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.sector-section {
  border-top: 1px solid var(--line-soft);
  margin-top: 16px;
  padding-top: 16px;
}

.sector-section h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.chain-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.chain-flow span {
  position: relative;
  min-height: 58px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  padding: 11px;
}

.serenity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.sector-company-list,
.evidence-list {
  display: grid;
  gap: 9px;
}

.sector-company-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(120px, .32fr);
  gap: 11px;
  align-items: center;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 11px;
}

.sector-company-row:hover {
  border-color: #b8c7dc;
  background: #f8fafc;
}

.sector-company-row .rank {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 900;
}

.sector-company-row strong {
  display: block;
  margin-bottom: 4px;
  color: #111827;
  font-size: 14px;
}

.sector-company-row strong em {
  margin-left: 6px;
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
}

.sector-company-row p,
.sector-company-row > span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sector-company-row .peer-why {
  grid-column: 2 / -1;
  color: #334155;
}

.sector-company-row.muted-row {
  background: #f8fafc;
}

.sector-company-row.muted-row strong,
.sector-company-row.muted-row .rank {
  opacity: .72;
}

.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-list span {
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.evidence-item {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.evidence-head strong {
  color: #111827;
  font-size: 13px;
}

.evidence-head span {
  color: var(--muted);
  font-size: 12px;
}

.evidence-item p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.7;
}

.timeline-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 0 13px;
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-date {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.timeline-title {
  margin-bottom: 5px;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.timeline-desc {
  color: #5b6472;
  font-size: 12px;
  line-height: 1.55;
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
  white-space: nowrap;
}

.company-item,
.resource-item {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.company-title,
.resource-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 900;
}

.company-title span,
.resource-type {
  flex-shrink: 0;
  border-radius: 999px;
  background: #334155;
  color: #ffffff;
  font-size: 11px;
  line-height: 1.2;
  padding: 4px 9px;
}

.company-context,
.resource-meta {
  margin-top: 7px;
  color: #5b6472;
  font-size: 12px;
  line-height: 1.55;
}

.external-report-section .compact-empty {
  margin-bottom: 10px;
  padding: 12px;
}

.external-report-results {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.external-report-brief,
.external-report-card {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.external-report-brief {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.external-report-brief strong {
  display: block;
  color: #1d4ed8;
  font-size: 14px;
  margin-bottom: 6px;
}

.external-report-card p,
.external-report-brief p {
  margin: 8px 0 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.7;
}

.record-list {
  gap: 12px;
}

.record-item {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.record-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.record-time {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.record-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.record-text {
  color: #334155;
  font-size: 13px;
  line-height: 1.72;
}

.record-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.record-toggle {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 0;
}

.record-delete {
  border: 0;
  background: #fff1f2;
  border-radius: 999px;
  color: #be123c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 9px;
}

.record-delete:hover {
  background: #ffe4e6;
}

.record-delete:disabled {
  cursor: wait;
  opacity: .65;
}

.profile-history-item .history-delete {
  align-items: center;
  background: #fff7f7;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(190, 18, 60, .12);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  position: absolute;
  right: 10px;
  top: 10px;
  transform: translateX(4px);
  transition: opacity .16s ease, transform .16s ease, background .16s ease;
  width: 30px;
}

.profile-history-item .history-delete::before {
  content: "";
  width: 15px;
  height: 16px;
  background:
    linear-gradient(#be123c, #be123c) 3px 0 / 9px 2px no-repeat,
    linear-gradient(#be123c, #be123c) 1px 4px / 13px 2px no-repeat,
    linear-gradient(#be123c, #be123c) 3px 7px / 2px 8px no-repeat,
    linear-gradient(#be123c, #be123c) 7px 7px / 2px 8px no-repeat,
    linear-gradient(#be123c, #be123c) 11px 7px / 2px 8px no-repeat,
    linear-gradient(#be123c, #be123c) 2px 6px / 12px 10px no-repeat;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  opacity: .9;
}

.profile-history-item:hover .history-delete,
.profile-history-item:focus-within .history-delete {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.profile-history-item .history-delete:hover {
  background: #ffe4e6;
}

.wide-button {
  width: 100%;
  margin-top: 14px;
}

.resource-item a {
  color: #0f172a;
}

.resource-item a:hover {
  color: var(--blue);
}

.import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  gap: 16px;
}

.import-steps {
  display: grid;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.step > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 900;
}

.step strong,
.drop-preview strong {
  display: block;
  margin-bottom: 7px;
}

.step p,
.drop-preview p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.65;
}

.drop-preview {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.drop-preview input {
  margin-top: 14px;
  padding-top: 8px;
}

.kimi-panel {
  grid-column: 1 / -1;
}

.kimi-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 110px 110px;
  gap: 10px;
  margin-top: 12px;
}

.share-disabled-kimi-config {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 150px auto;
  gap: 10px;
  margin-top: 12px;
}

.share-disabled-kimi-config input,
.kimi-controls input {
  width: 100%;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 10px 12px;
}

.kimi-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.settings-panel {
  max-width: 980px;
}

.settings-form {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 180px auto;
  gap: 12px;
  align-items: end;
}

.settings-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 11px 12px;
}

.settings-flow {
  display: grid;
  gap: 12px;
}

.kimi-stock-section .empty {
  margin-bottom: 12px;
}

.kimi-stock-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.technical-loading {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  padding: 14px;
}

.technical-content {
  display: grid;
  gap: 12px;
}

.technical-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(160px, .7fr);
  gap: 10px;
}

.technical-judge,
.technical-price {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.technical-judge.warn {
  border-color: #fecdd3;
  background: #fff7f7;
}

.technical-judge strong,
.technical-price strong {
  display: block;
  color: #111827;
  font-size: 18px;
  line-height: 1.2;
}

.technical-judge span,
.technical-price span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.technical-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.technical-grid div {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.technical-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.technical-grid strong {
  display: block;
  margin-top: 6px;
  color: #111827;
  font-size: 16px;
}

.technical-alerts {
  display: grid;
  gap: 8px;
}

.technical-alerts div {
  border-left: 3px solid #be123c;
  background: #fff7f7;
  border-radius: 6px;
  color: #7f1d1d;
  font-size: 13px;
  line-height: 1.6;
  padding: 9px 11px;
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.inline-status {
  color: var(--muted);
  font-size: 12px;
}

.inline-status.ok {
  color: var(--green);
  font-weight: 900;
}

.inline-status.error {
  color: var(--red);
  font-weight: 900;
}

.preview-result {
  min-height: 84px;
  margin-top: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  line-height: 1.7;
  padding: 12px;
}

.preview-result.compact-result {
  min-height: 0;
  margin-top: 10px;
  font-size: 12px;
}

.empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  padding: 16px;
}

/* Build Web Apps global refresh */
:root {
  --bg: #eef3f8;
  --panel: #ffffff;
  --panel-soft: #f6f8fb;
  --ink: #111827;
  --muted: #667085;
  --line: #d5deea;
  --line-soft: #e8edf5;
  --sidebar: #0f172a;
  --sidebar-soft: #1a2536;
  --blue: #1d4ed8;
  --teal: #0f766e;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
  --purple: #6d28d9;
  --cyan: #047f95;
  --shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

body {
  background:
    linear-gradient(180deg, #f7fafc 0, #eef3f8 260px, #eef3f8 100%);
}

body::before {
  content: "";
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #1d4ed8, #0891b2 52%, #f59e0b);
}

.app-shell {
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
}

.sidebar {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  background: #0f172a;
  box-shadow: 0 24px 44px rgba(15, 23, 42, .18);
}

.sidebar::before {
  content: "";
  display: block;
  height: 1px;
  margin: -22px -18px 18px;
  background: linear-gradient(90deg, rgba(56, 189, 248, .7), rgba(245, 158, 11, .7));
}

.brand {
  margin-bottom: 28px;
}

.brand-mark {
  background: #f59e0b;
  box-shadow: 0 10px 24px rgba(245, 158, 11, .28);
}

.side-nav {
  gap: 8px;
}

.side-link {
  min-height: 42px;
  border: 1px solid transparent;
  color: #d8e2f0;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.side-link:hover {
  border-color: rgba(148, 163, 184, .22);
  background: rgba(255, 255, 255, .05);
  color: #ffffff;
  transform: translateX(2px);
}

.side-link.active {
  border-color: rgba(245, 158, 11, .34);
  background: #1d2a40;
}

.side-link::after {
  opacity: .72;
}

.side-panel {
  margin-top: 24px;
  border-top-color: rgba(203, 213, 225, .2);
}

.side-note {
  border: 1px solid rgba(148, 163, 184, .16);
  background: #172235;
}

.main {
  gap: 18px;
}

.topbar,
.panel,
.control-strip,
.sector-overview-panel,
.plugin-upgrade-banner {
  border-color: #dbe3ef;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .07);
}

.topbar {
  position: relative;
  overflow: hidden;
  min-height: 96px;
  padding: 22px 24px 22px 28px;
}

.topbar::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--blue);
}

.eyebrow,
.panel-kicker {
  color: #1d4ed8;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(26px, 2.7vw, 36px);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: 0;
}

.subtle {
  color: #5f6f85;
}

.panel {
  padding: 22px;
}

.control-strip {
  padding: 16px;
}

.pill-button,
.icon-button,
.wide-button {
  border-color: #cfd8e6;
  background: #ffffff;
  color: #26364d;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.pill-button:hover,
.icon-button:hover,
.wide-button:hover {
  border-color: #93b4e8;
  color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(29, 78, 216, .08);
}

.pill-button.primary,
.wide-button.primary {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
}

.pill-button.primary:hover,
.wide-button.primary:hover {
  background: #1e40af;
  color: #ffffff;
}

input,
select,
textarea,
.settings-form input {
  border-color: #cfd8e6;
  background: #ffffff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus,
.settings-form input:focus {
  outline: 3px solid rgba(29, 78, 216, .13);
  border-color: #1d4ed8;
}

.metric,
.stock-stat,
.score-card,
.analysis-card,
.resource-item,
.company-item,
.record-item,
.stock-card,
.sector-card,
.profile-history-item,
.technical-judge,
.technical-price,
.technical-grid div,
.kimi-stock-card {
  border-color: #dde5ef;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}

.metric {
  background: linear-gradient(180deg, #ffffff 0, #f7f9fc 100%);
}

.metric strong,
.technical-grid strong,
.technical-judge strong,
.technical-price strong {
  color: #0b1220;
}

.plugin-upgrade-banner {
  border-color: #b9d3ff;
  background: #f3f8ff;
}

.sector-overview-panel {
  position: relative;
  overflow: hidden;
}

.sector-overview-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #1d4ed8, #0891b2, #f59e0b);
}

.empty,
.preview-result,
.technical-loading {
  background: #ffffff;
  border-color: #cbd5e1;
}

@media print {
  @page {
    margin: 12mm;
    size: A4;
  }

  body.print-stock-profile {
    background: #ffffff;
  }

  body.print-stock-profile .sidebar,
  body.print-stock-profile .topbar,
  body.print-stock-profile .control-strip,
  body.print-stock-profile .stock-list-panel,
  body.print-stock-profile .run-stock-kimi,
  body.print-stock-profile .record-delete,
  body.print-stock-profile .record-toggle,
  body.print-stock-profile #kimiRunStatus {
    display: none !important;
  }

  body.print-stock-profile .app-shell,
  body.print-stock-profile .main,
  body.print-stock-profile .stock-page-grid {
    display: block;
    width: auto;
    min-height: auto;
    padding: 0;
    margin: 0;
  }

  body.print-stock-profile .profile-detail,
  body.print-stock-profile .panel,
  body.print-stock-profile .analysis-card,
  body.print-stock-profile .profile-history-item,
  body.print-stock-profile .resource-item,
  body.print-stock-profile .technical-judge,
  body.print-stock-profile .technical-price,
  body.print-stock-profile .technical-grid div {
    border-color: #d8dee9;
    box-shadow: none;
    break-inside: avoid;
  }

  body.print-stock-profile .profile-detail {
    padding: 0;
    min-height: auto;
  }

  body.print-stock-profile .profile-hero {
    border-bottom: 2px solid #111827;
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  body.print-stock-profile .kimi-stock-grid,
  body.print-stock-profile .analysis-grid,
  body.print-stock-profile .technical-grid {
    grid-template-columns: 1fr 1fr;
  }

  body.print-stock-profile .profile-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: 0;
  }

  .side-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .side-link::after {
    display: none;
  }

  .hero-grid,
  .two-column,
  .import-grid,
  .stock-layout,
  .stock-page-grid,
  .sector-page-grid,
  .serenity-grid,
  .score-grid,
  .chain-flow,
  .share-disabled-kimi-config,
  .kimi-controls,
  .kimi-stock-grid,
  .settings-form,
  .technical-summary-row,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .stock-list-panel,
  .sector-list-panel {
    position: static;
    max-height: none;
  }

  .stock-grid.large,
  .sector-list {
    max-height: 520px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-strip {
    grid-template-columns: 1fr;
  }

  .theme-row,
  .timeline-item,
  .theme-map-row,
  .stock-toolbar,
  .sector-company-row {
    grid-template-columns: 1fr;
  }

  .badge-list {
    justify-content: flex-start;
  }

  .side-nav {
    grid-template-columns: 1fr 1fr;
  }

  .stock-stat-row {
    grid-template-columns: 1fr;
  }

  .technical-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }
}


/* Cloudflare read-only share mode */
.share-mode .import-panel,
.share-mode .settings-only,
.share-mode .record-delete,
.share-mode .run-stock-kimi,
.share-mode .run-report-search,
.share-mode #kimiRunStatus,
.share-mode .technical-section {
  display: none !important;
}

.share-mode .side-link[href*="settings"],
.share-mode .side-link[href*="import"],
.share-mode .top-actions a[href*="import"],
.share-mode .top-actions a[href*="settings"] {
  display: none !important;
}

.share-mode .side-note::after {
  content: " 当前为只读分享版，已关闭导入、删除、API 设置和在线重算。";
}
