:root {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-strong: #eef4f2;
  --ink: #1e2524;
  --muted: #65706e;
  --line: #d9e1de;
  --cedar: #0f766e;
  --cedar-dark: #0b4f4a;
  --blue: #2563eb;
  --amber: #c27616;
  --red: #c24135;
  --green: #16803c;
  --shadow: 0 18px 45px rgba(20, 34, 31, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  font-family:
    Inter, "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 14px clamp(16px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 246, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--cedar-dark);
  font-weight: 800;
}

.brand h1,
.brand p,
.report-toolbar h2,
.report-toolbar p,
.hero-copy h3,
.hero-copy p,
.section-title h2,
.section-title p,
.panel h3,
.panel p {
  margin: 0;
}

.brand h1 {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.15;
}

.brand p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #b9d1cb;
  border-radius: 999px;
  color: var(--cedar-dark);
  background: #e8f3f0;
  font-size: 12px;
  font-weight: 700;
}

.icon-button,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
}

.icon-button svg,
.primary-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
  gap: 22px;
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 22px clamp(16px, 3vw, 34px) 36px;
}

.sidebar {
  position: sticky;
  top: 98px;
  align-self: start;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.search-panel,
.side-section,
.panel,
.ai-summary-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  min-width: 0;
}

.search-panel label,
.side-section h2 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ticker-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.ticker-search input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fbfcfc;
  font-weight: 800;
  text-transform: uppercase;
}

.ticker-search input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  border-color: var(--cedar);
}

.primary-action {
  gap: 7px;
  min-width: 82px;
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--cedar);
  font-size: 14px;
  font-weight: 800;
}

.data-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ticker-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ticker-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
}

.ticker-chip strong {
  display: block;
  font-size: 14px;
}

.ticker-chip span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-chip em {
  min-width: 44px;
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--cedar-dark);
  background: #e8f3f0;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.ticker-chip.active {
  border-color: var(--cedar);
  background: var(--surface-strong);
}

.side-section {
  padding: 16px;
}

.side-section h2 {
  margin: 0 0 10px;
}

.grade-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 72px;
}

.grade-panel span {
  color: var(--cedar-dark);
  font-size: 22px;
  font-weight: 900;
}

.grade-panel strong {
  font-size: 48px;
  line-height: 0.95;
}

.report-area {
  min-width: 0;
}

.report-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-height: 56px;
  margin-bottom: 14px;
}

.eyebrow {
  color: var(--cedar);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-toolbar h2 {
  margin-top: 3px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.1;
}

.timestamp {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.loading-bar {
  overflow: hidden;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #dfe8e5;
}

.loading-bar span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: var(--cedar);
  animation: loadingSweep 0.8s ease-in-out infinite;
}

@keyframes loadingSweep {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(270%);
  }
}

.hero-report {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 210px);
  gap: 24px;
  align-items: center;
  min-height: 260px;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid #bbd6d1;
  border-radius: 8px;
  background:
    linear-gradient(110deg, rgba(232, 243, 240, 0.96), rgba(255, 255, 255, 0.78)),
    repeating-linear-gradient(90deg, rgba(15, 118, 110, 0.07) 0, rgba(15, 118, 110, 0.07) 1px, transparent 1px, transparent 54px);
  box-shadow: var(--shadow);
}

.ticker-line {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 14px;
}

.ticker-line span:first-child {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 13px;
  color: #fff;
  background: var(--cedar-dark);
  font-size: 14px;
  font-weight: 900;
}

.ticker-line span:last-child {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h3 {
  max-width: 840px;
  font-size: clamp(24px, 4vw, 46px);
  line-height: 1.08;
}

.hero-copy p {
  max-width: 840px;
  margin-top: 16px;
  color: #3c4947;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.72;
}

.score-dial {
  position: relative;
  display: grid;
  width: min(100%, 210px);
  aspect-ratio: 1;
  place-items: center;
  justify-self: end;
}

.score-dial svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.dial-track,
.dial-value {
  fill: none;
  stroke-width: 11;
}

.dial-track {
  stroke: #d7e5e1;
}

.dial-value {
  stroke: var(--cedar);
  stroke-dasharray: 0 100;
  stroke-linecap: round;
  transition: stroke-dasharray 360ms ease;
}

.dial-label {
  position: absolute;
  display: grid;
  place-items: center;
}

.dial-label strong {
  font-size: clamp(42px, 6vw, 62px);
  line-height: 0.92;
}

.dial-label span {
  margin-top: 9px;
  color: var(--cedar-dark);
  font-weight: 900;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.metric-card {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--surface);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 13px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.05;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.score-panel {
  min-height: 174px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}

.panel-heading h3 {
  font-size: 15px;
  line-height: 1.25;
}

.panel-heading span,
.panel-heading strong {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--cedar-dark);
  background: #e8f3f0;
  font-size: 12px;
  font-weight: 900;
}

/* 标题内联动态指数名:普通文字,不套徽标样式 */
#pm_caphead {
  border-radius: 0;
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  flex: initial;
}

.bar-meter,
.temperature-track {
  overflow: hidden;
  height: 10px;
  margin: 22px 0 18px;
  border-radius: 999px;
  background: #e2e9e7;
}

.bar-meter span,
.temperature-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--cedar);
  transition: width 360ms ease;
}

.temperature-track {
  background: linear-gradient(90deg, #4b83d4 0%, #35a36f 42%, #d59b21 70%, #c24135 100%);
}

.temperature-track span {
  width: 5px;
  min-width: 5px;
  background: #111827;
}

.score-panel p,
.panel p,
.ai-summary-panel p {
  color: #4a5654;
  font-size: 13px;
  line-height: 1.6;
}

.strategy-band,
.insight-layout,
.ai-summary-panel {
  margin-top: 16px;
}

.section-title {
  margin: 0 0 12px;
}

.section-title h2 {
  margin-top: 3px;
  font-size: 22px;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px;
}

.mini-bars {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

.mini-bar {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
}

.mini-bar span,
.mini-bar strong {
  color: var(--muted);
  font-size: 12px;
}

.mini-bar div {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e2e9e7;
}

.mini-bar div i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cedar);
}

.ma-chart {
  display: grid;
  grid-template-columns: repeat(5, minmax(34px, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 132px;
  margin-top: 15px;
  padding-top: 8px;
}

.ma-column {
  display: grid;
  gap: 7px;
  align-items: end;
  justify-items: center;
  min-width: 0;
}

.ma-column i {
  display: block;
  width: 100%;
  max-width: 24px;
  min-height: 18px;
  border-radius: 6px 6px 0 0;
  background: var(--cedar);
}

.ma-column span {
  color: var(--muted);
  font-size: 11px;
}

.position-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.position-step {
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfc;
  font-weight: 900;
}

.position-step.active {
  border-color: var(--cedar);
  color: #fff;
  background: var(--cedar);
}

.insight-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mapping-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.mapping-item,
.alert-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fbfcfc;
}

.mapping-item strong,
.alert-item strong {
  display: block;
  font-size: 14px;
}

.mapping-item span,
.alert-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.chain-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.chain-node {
  position: relative;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfc;
}

.chain-node::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -9px;
  width: 9px;
  height: 1px;
  background: var(--line);
}

.chain-node:last-child::after {
  content: none;
}

.chain-node span {
  color: var(--cedar);
  font-size: 12px;
  font-weight: 900;
}

.chain-node strong {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

.logic-tree {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.logic-branch {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 42px;
}

.logic-branch strong {
  border-left: 3px solid var(--cedar);
  padding-left: 9px;
  font-size: 13px;
}

.logic-branch span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.alert-list {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.alert-item {
  border-left: 4px solid var(--amber);
}

.alert-item.high {
  border-left-color: var(--red);
}

.alert-item.low {
  border-left-color: var(--green);
}

.ai-summary-panel {
  padding: 20px;
}

.ai-summary-panel p {
  max-width: 1100px;
  margin: 0;
  font-size: 15px;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .module-grid,
  .strategy-grid {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .ticker-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-report {
    grid-template-columns: 1fr;
  }

  .score-dial {
    justify-self: start;
    max-width: 170px;
  }

  .insight-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar,
  .report-toolbar {
    align-items: start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .ticker-list,
  .ticker-chip,
  .search-panel,
  .side-section,
  .report-area,
  .hero-report,
  .panel,
  .ai-summary-panel {
    width: 100%;
    max-width: calc(100vw - 32px);
  }

  .module-grid,
  .strategy-grid,
  .mapping-list,
  .chain-map {
    grid-template-columns: 1fr;
  }

  /* 手机端:股票列表 + 基础信息卡片 均一行 2 个 */
  .ticker-list,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ticker-search {
    grid-template-columns: 1fr;
  }

  .primary-action {
    width: 100%;
    min-width: 0;
  }

  .ticker-chip {
    grid-template-columns: 1fr;
  }

  .ticker-chip em {
    justify-self: start;
  }

  .hero-copy h3 {
    font-size: 28px;
  }

  .logic-branch {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .sidebar,
  .report-toolbar,
  .loading-bar {
    display: none;
  }

  .workspace {
    display: block;
    padding: 0;
  }

  .panel,
  .hero-report,
  .metric-card,
  .ai-summary-panel {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* ===== 改进版任务书:三层架构 + 决策矩阵 + 红线 Gate ===== */
.gate-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: #f0f8f3;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.gate-banner.veto {
  border-left-color: var(--red);
  background: #fcf1f0;
}
.gate-flag {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: var(--green);
}
.gate-banner.veto .gate-flag { background: var(--red); }

.dual-badge {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.dual-badge div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfc;
  text-align: center;
}
.dual-badge span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.dual-badge strong { display: block; margin-top: 6px; font-size: 22px; font-weight: 900; color: var(--cedar-dark); }

.matrix-panel { margin-bottom: 16px; }
.matrix-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 16px;
}
.matrix-grid {
  display: grid;
  grid-template-columns: 86px repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.matrix-grid .mh {
  display: grid;
  place-items: center;
  padding: 6px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.matrix-grid .rl {
  justify-content: start;
  text-align: left;
}
.matrix-grid .cell {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.matrix-grid .cell.active {
  border-color: var(--cedar);
  border-width: 2px;
  background: var(--cedar);
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.25);
}
.matrix-grid .cell.veto.active { background: var(--red); border-color: var(--red); }
.matrix-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.layer-score {
  display: inline-block;
  margin-left: 8px;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
  color: var(--cedar-dark);
  background: #e8f3f0;
  vertical-align: middle;
}
.module-grid.two-block { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }

@media (max-width: 900px) {
  .matrix-wrap { grid-template-columns: 1fr; }
  .module-grid.two-block { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .matrix-grid { grid-template-columns: 60px repeat(3, 1fr); font-size: 11px; }
  .dual-badge { grid-template-columns: 1fr 1fr; }
}

/* ===== 改进版:第一步温度闸 + 闸门式综合评级 ===== */
.temp-gate { margin-bottom: 14px; border-left: 4px solid var(--amber); }
/* 总仓位天花板:显著结论条 */
.pm-cap-final { margin:10px 0 4px; padding:12px 16px; border-radius:10px;
  border:1px solid rgba(15,118,110,.4); background:rgba(15,118,110,.10); color:var(--cedar-dark);
  font-size:20px; font-weight:900; letter-spacing:.5px; }
.tg-idxname { margin:2px 0 2px; font-size:14px; font-weight:800; color:var(--cedar-dark); }
.temp-gate .tg-row { display:flex; align-items:center; gap:22px; margin:6px 0 12px; flex-wrap:wrap; }
/* 仓位面板:大字温度值与上方标题拉开间距 */
.tg-row { display:flex; align-items:center; gap:22px; margin-top:20px; flex-wrap:wrap; }
.tg-dial { display:flex; align-items:baseline; gap:4px; }
.tg-dial strong { font-size:42px; font-weight:800; color:var(--amber); line-height:1; }
.tg-dial span { color:var(--muted); font-weight:700; }
.tg-meta { display:flex; gap:26px; flex-wrap:wrap; }
.tg-meta > div { display:flex; flex-direction:column; gap:2px; }
.tg-meta span { font-size:12px; color:var(--muted); }
.tg-meta b { font-size:15px; color:var(--ink); font-weight:800; }
.gated-strip { margin-bottom: 16px; border-left: 4px solid var(--cedar); }
.gate-flow { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:6px 0 8px; }
.gflow { display:flex; flex-direction:column; gap:2px; padding:8px 14px; border-radius:10px; background:var(--surface-strong); border:1px solid var(--line); }
.gflow span { font-size:12px; color:var(--muted); }
.gflow b { font-size:14px; font-weight:800; }
.gflow.ok { border-color:var(--green); }
.gflow.block { border-color:var(--red); background:#fbe9e7; }
.gflow.block b { color:var(--red); }
.gflow-arrow { color:var(--muted); font-style:normal; font-weight:800; }

/* ===== 标签页(分步详情,降信息过载) ===== */
.pane:not(.show) { display: none !important; }   /* 非当前标签隐藏;显示时保留各自原布局 */
.tab-nav {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 14px;
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.tab-nav .tab {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 13px;
  transition: all .15s;
}
.tab-nav .tab:hover { color: var(--ink); border-color: var(--cedar); }
.tab-nav .tab.active {
  background: var(--cedar); color: #fff; border-color: var(--cedar);
  box-shadow: 0 6px 16px rgba(15,118,110,.25);
}

/* ===== 决策流程小结(忠实版:替代综合评级) ===== */
.proc-summary { flex:1; min-width:300px; background:var(--surface-strong); border:1px solid var(--line); border-radius:14px; padding:14px 16px; }
.proc-head { font-size:12px; font-weight:800; color:var(--muted); margin-bottom:10px; }
.proc-row { display:flex; gap:12px; padding:8px 0; border-bottom:1px dashed var(--line); }
.proc-row:last-child { border-bottom:none; }
.proc-row > span { flex:0 0 110px; color:var(--cedar); font-weight:800; font-size:13px; white-space:nowrap; }
.proc-row > b { color:var(--ink); font-weight:600; font-size:13px; line-height:1.55; }

/* ===== 第一步:板块 K 线图 ===== */
.kline-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:6px; flex-wrap:wrap; }
.kline-head h3 { font-size:14px; }
.kline-hint { color:var(--muted); font-weight:500; font-size:11px; opacity:.75; white-space:nowrap; }
.kline { position:relative; margin:2px 0 12px; min-height:300px; border:1px solid var(--line); border-radius:12px; background:var(--surface); overflow:hidden; box-shadow:inset 0 1px 0 rgba(255,255,255,.4); }
/* 均线文明:判断结论横幅 + 各战法明细 */
.ma-verdict { font-size:14px; font-weight:800; padding:11px 14px; border-radius:10px; margin:4px 0 10px; border:1px solid var(--line); background:var(--surface-strong); line-height:1.5; }
.ma-verdict.ma-go { color:#0f766e; background:rgba(15,118,110,.10); border-color:rgba(15,118,110,.4); }
.ma-verdict.ma-bad { color:var(--red); background:rgba(194,65,53,.08); border-color:rgba(194,65,53,.4); }
.ma-verdict.ma-wait { color:#b45309; background:rgba(245,158,11,.10); border-color:rgba(245,158,11,.42); }
/* 最终结论包裹(唯一·最醒目) */
.ma-final { margin:4px 0 10px; }
.ma-final .ma-verdict { margin:0; font-size:14.5px; }
/* 各表底部的"层小结" */
.ma-concl { margin-top:12px; padding:9px 11px; border-radius:9px; border:1px solid var(--line);
  background:var(--surface-strong); font-size:12.5px; line-height:1.5; display:flex; flex-direction:column; gap:3px; }
.ma-concl > b { font-size:11px; font-weight:800; letter-spacing:.3px; opacity:.85; }
.ma-concl.ma-go { color:#0f766e; background:rgba(15,118,110,.10); border-color:rgba(15,118,110,.4); }
.ma-concl.ma-bad { color:var(--red); background:rgba(194,65,53,.08); border-color:rgba(194,65,53,.4); }
.ma-concl.ma-wait { color:#b45309; background:rgba(245,158,11,.10); border-color:rgba(245,158,11,.42); }
.ma-detail { margin-top:12px; }
.ma-detail .ma-row { display:flex; gap:12px; padding:7px 0; border-bottom:1px dashed var(--line); font-size:13px; line-height:1.55; }
.ma-detail .ma-row:last-child { border-bottom:none; }
.ma-detail .ma-row > b { flex:0 0 104px; color:var(--cedar); font-weight:800; white-space:nowrap; }
.ma-detail .ma-row > span { color:var(--ink); }
/* 三低买点图 inline 图例 */
.kline-legend-inline { display:flex; flex-wrap:wrap; gap:14px; margin-top:6px; font-size:11.5px; font-weight:700; color:var(--muted); }
/* 日K / 周K 解读拆成左右两列独立表 */
.ma-col-cap { font-size:12px; font-weight:800; color:var(--cedar);
  padding-bottom:6px; margin-bottom:2px; border-bottom:2px solid var(--line); letter-spacing:.3px; }

/* 均线文明:周K 全套 → 日K 全套(竖向两段,各含 图+表+小结) */
.ma-tf-block { margin-top:12px; }
.ma-tf-block + .ma-tf-block { margin-top:18px; padding-top:14px; border-top:1px dashed var(--line); }
.ma-chart-col .kline-head h4 { font-size:13px; font-weight:800; color:var(--ink); }
.ma-chart-col .kline { min-height:280px; }
.kline-legend-float {
  position:absolute; top:10px; left:12px; z-index:3; pointer-events:none;
  font-size:11.5px; font-weight:600; color:var(--ink); line-height:1.6;
  background:rgba(255,255,255,.82); backdrop-filter:blur(6px);
  border:1px solid var(--line); border-radius:8px; padding:5px 10px;
  max-width:calc(100% - 24px); box-shadow:0 2px 8px rgba(15,23,42,.06);
}
.kline-legend-float .lg-date { color:var(--muted); margin-right:8px; font-weight:700; }
.kline-legend-float b { font-weight:700; margin:0 6px 0 1px; color:var(--ink); }
.kline-legend-float b.up { color:#e23b41; }
.kline-legend-float b.down { color:#1aa251; }
.kline-legend-float .sep { color:var(--line); margin:0 5px; }

/* ===== 第一步:宏观择时 方向锚 ===== */
.dir-anchor { font-size:22px; font-weight:800; padding:14px 16px; border-radius:12px; text-align:center; border:1px solid var(--line); background:var(--surface-strong); color:var(--muted); }
.dir-anchor.long { color:#0f766e; background:rgba(15,118,110,.10); border-color:rgba(15,118,110,.40); }
.dir-anchor.flat { color:var(--red); background:rgba(194,65,53,.08); border-color:rgba(194,65,53,.40); }
.block-subtitle { font-size:14px; font-weight:800; color:var(--ink); margin:22px 0 4px; }
.hero-sub-title { font-size:13px; font-weight:800; color:var(--muted); margin:28px 0 6px; letter-spacing:.3px; }
.hero-table { border-collapse:collapse; margin-top:6px; width:100%; max-width:600px; }
.hero-table th, .hero-table td { text-align:left; padding:8px 14px; border-bottom:1px solid var(--line); vertical-align:top; }
.hero-table tr:last-child th, .hero-table tr:last-child td { border-bottom:none; }
.hero-table th { font-weight:800; color:var(--cedar); white-space:nowrap; width:104px; font-size:14px; }
.hero-table td { color:var(--ink); font-weight:600; font-size:15px; line-height:1.5; }

/* 六维共振:醒目结论横幅(属哪种股) */
.reso-verdict { display:flex; align-items:baseline; gap:14px; flex-wrap:wrap; margin:6px 0 14px; padding:16px 18px; border-radius:12px; border:1px solid var(--line); background:var(--surface-strong); }
.reso-verdict strong { font-size:24px; font-weight:800; letter-spacing:.5px; }
.reso-verdict span { font-size:13px; font-weight:700; color:var(--muted); }
.reso-verdict.reso-s { color:#b45309; background:linear-gradient(180deg,rgba(245,158,11,.16),rgba(245,158,11,.05)); border-color:rgba(245,158,11,.5); }
.reso-verdict.reso-a { color:#0f766e; background:rgba(15,118,110,.10); border-color:rgba(15,118,110,.42); }
.reso-verdict.reso-b { color:#2563eb; background:rgba(37,99,235,.08); border-color:rgba(37,99,235,.36); }
.reso-verdict.reso-c { color:var(--muted); background:var(--surface-strong); border-color:var(--line); }
.reso-verdict.reso-veto { color:var(--red); background:rgba(194,65,53,.08); border-color:rgba(194,65,53,.42); }

/* 三低体系判断:结论横幅 */
.tl-verdict { font-size:15px; font-weight:800; padding:12px 14px; border-radius:10px; margin:4px 0 12px; border:1px solid var(--line); background:var(--surface-strong); line-height:1.5; }
.tl-verdict.tl-go { color:#0f766e; background:rgba(15,118,110,.10); border-color:rgba(15,118,110,.4); }
.tl-verdict.tl-veto { color:var(--red); background:rgba(194,65,53,.08); border-color:rgba(194,65,53,.4); }
.tl-verdict.tl-wait { color:#b45309; background:rgba(245,158,11,.10); border-color:rgba(245,158,11,.42); }

/* 六维共振:逐维达标/未达标 */
.dim-row { display:flex; align-items:baseline; gap:10px; padding:7px 0; border-bottom:1px dashed var(--line); font-size:13px; }
.dim-row:last-child { border-bottom:none; }
.dim-flag { flex:0 0 16px; text-align:center; font-weight:800; }
.dim-row.hit .dim-flag { color:#0f766e; }
.dim-row.miss .dim-flag { color:var(--muted); opacity:.7; }
.dim-name { flex:0 0 92px; font-weight:700; color:var(--ink); }
.dim-row.miss .dim-name { color:var(--muted); }
.dim-basis { color:var(--muted); font-weight:500; }

.ma-readout { font-size:13px; color:var(--muted); }
.ma-line { line-height:1.75; }
.ma-line + .ma-line { margin-top:1px; }
.ma-line span { margin-right:16px; font-weight:700; }
.ma-line b { font-weight:800; color:var(--ink); }

.reason-list { margin-top:12px; }
.reason-row { padding:7px 2px; font-size:13px; font-weight:600; color:var(--ink); border-bottom:1px dashed var(--line); }
.reason-row:last-child { border-bottom:none; }

/* ===== 第四步:3-2-2-2 建仓节奏 + 仓位管理三套阵型 ===== */
.formation-steps { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.formation-steps > div { background:var(--surface-strong); border:1px solid var(--line); border-radius:10px; padding:12px 10px; text-align:center; }
.formation-steps > div > span { display:block; font-size:12px; color:var(--muted); font-weight:700; }
.formation-steps > div > strong { display:block; font-size:22px; font-weight:800; color:var(--cedar); margin:5px 0; }
.formation-steps > div > em { font-style:normal; font-size:11px; color:var(--muted); line-height:1.4; }
.formation-name { font-size:13px; font-weight:800; color:var(--ink); margin:16px 0 8px; }
.formation-name:first-of-type { margin-top:4px; }
.formation-tag { font-weight:700; color:var(--cedar); font-size:12px; margin-left:8px; }
.formation-note { margin-top:8px !important; }
.pm-list > div { padding:3px 0; line-height:1.5; }
.pm-list b { color:var(--cedar); }
.note-list { margin:6px 0 0; padding-left:18px; }
.note-list li { padding:3px 0; line-height:1.6; }
#polarityType { color:var(--cedar); }
.pole-active { border-color:var(--cedar) !important; box-shadow:0 0 0 2px rgba(15,118,110,.25); }
.formation-steps > div.active { border-color:var(--cedar); box-shadow:0 0 0 2px rgba(15,118,110,.25); background:rgba(15,118,110,.06); }
.formation-steps > div.active > strong { color:#0f766e; }
.formation-table > div { display:flex; gap:12px; padding:9px 0; border-bottom:1px dashed var(--line); align-items:baseline; }
.formation-table > div:last-child { border-bottom:none; }
.formation-table b { flex:0 0 96px; color:var(--cedar); font-weight:800; white-space:nowrap; }
/* 左右两卡等宽(第五步 / 跨市场账户等) */
.module-grid.two-block.exit-cols,
.module-grid.two-block.eq { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* 手机端:第五步 ①② 改为一行一个(覆盖上面的 2 列) */
@media (max-width: 620px) {
  .module-grid.two-block.exit-cols,
  .module-grid.two-block.eq { grid-template-columns: 1fr; }
}
.formation-table span { color:var(--ink); font-size:13px; line-height:1.55; }

/* ===== 第三步:风险隔离 30/20 ===== */
.risk-caps { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.risk-caps > div { background:var(--surface-strong); border:1px solid var(--line); border-radius:12px; padding:16px 14px; text-align:center; }
.risk-caps > div > span { display:block; color:var(--muted); font-size:12px; font-weight:700; margin-bottom:8px; }
.risk-caps > div > strong { font-size:24px; font-weight:800; color:var(--cedar); }

/* ===== 派生/合成构件标注(非本方法原创) ===== */
.derived-tag { font-style:normal; font-size:11px; font-weight:700; color:var(--muted); background:var(--surface-strong); border:1px dashed var(--line); border-radius:6px; padding:2px 7px; margin-left:8px; vertical-align:middle; }

/* ===== 第五步:终局思维 离场信号 ===== */
.exit-row { padding:10px 12px; border-radius:10px; background:var(--surface-strong); border:1px solid var(--line); margin-bottom:8px; font-size:13px; font-weight:600; color:var(--ink); line-height:1.5; }
.exit-row.warn { background:rgba(194,65,53,.08); border-color:rgba(194,65,53,.35); color:var(--red); font-weight:700; }
