:root {
  --blue: #1f55b5;
  --ink: #24262d;
  --muted: #8d929d;
  --line: #e7e1df;
  --pink: #c51b5e;
  --pink-deep: #aa0f49;
  --pink-soft: #f8d0dc;
  --green: #128657;
  --orange: #b86117;
  --paper: #fffdf9;
  --wash: #f5f3ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f1f2f5;
  color: var(--ink);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(100%, 1160px);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  border-top: 4px solid #164aab;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .04);
}

.notice-bar {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.notice-title {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--blue);
  font-size: 22px;
}

.target-icon {
  color: #111;
  font-size: 24px;
}

.notice-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.count-pill {
  padding: 10px 18px;
  border-radius: 4px;
  background: #efefe9;
  color: #575b5c;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #e1e1db;
}

.icon-btn,
.card-close {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #8a8b8f;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.controls {
  padding: 14px 16px 0;
}

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

.search-form input {
  min-width: 0;
  height: 38px;
  border: 1px solid #d8d5cf;
  border-radius: 6px;
  padding: 0 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.segment {
  display: flex;
  height: 38px;
  border: 1px solid #d8d5cf;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.seg-btn,
.refresh-btn {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.seg-btn {
  width: 56px;
  background: #fff;
  color: #777b83;
}

.seg-btn.active {
  background: var(--pink);
  color: #fff;
}

.refresh-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
}

.terminal {
  position: relative;
  margin: 16px;
  padding: 20px 20px 16px;
  border: 2px solid #c62868;
  border-radius: 4px;
  background: var(--paper);
}

.terminal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .9fr);
  gap: 18px;
  align-items: start;
}

.alert-card {
  min-width: 0;
}

.side-panel {
  min-width: 0;
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f2f0ec;
  font-size: 24px;
}

.hidden {
  display: none !important;
}

.loading,
.error {
  padding: 40px 12px;
  text-align: center;
  color: #6f737b;
  font-weight: 700;
}

.error {
  color: #9b143f;
}

.top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 92px;
  gap: 12px;
  align-items: start;
}

.identity {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.logo {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(#7fba00 0 25%, #00a4ef 0 50%, #f25022 0 75%, #ffb900 0);
  color: #fff;
  font-size: 0;
}

.ticker-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.ticker-line span {
  font-size: 30px;
  font-weight: 900;
  color: #09090b;
}

.ticker-line strong {
  font-size: 21px;
  color: #111;
}

.ticker-line em {
  font-style: normal;
  color: #a7243f;
  font-size: 18px;
  font-weight: 900;
}

.signal-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--pink);
  font-weight: 900;
}

.signal-pill {
  padding: 8px 12px;
  border-radius: 3px;
  background: var(--pink);
  color: #fff;
}

.fire {
  color: #d06a00;
}

.score-box,
.prob-box {
  text-align: center;
  font-weight: 800;
}

.score-box strong,
.prob-box strong {
  display: block;
  line-height: 1;
  font-size: 42px;
}

.score-box strong {
  color: #2359bf;
}

.prob-box strong {
  color: var(--green);
}

.score-box span,
.prob-box span {
  display: block;
  margin-top: 5px;
  color: var(--blue);
  font-size: 14px;
}

.prob-box span {
  color: var(--green);
}

.score-box small {
  display: block;
  margin-top: 6px;
  color: var(--blue);
  font-size: 15px;
}

.mini-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
  color: #a16022;
  font-weight: 900;
}

.mini-banner span {
  padding: 8px 12px;
  background: #fff0da;
  border-radius: 3px;
}

.mini-banner small {
  color: #777a83;
  font-size: 14px;
}

.range-block {
  margin-top: 18px;
}

.range-header,
.range-footer,
.section-title,
.score-label,
.source-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #6c7078;
  font-weight: 800;
}

.range-header {
  flex-wrap: wrap;
}

.range-header i {
  margin-left: 8px;
  color: #9d2e31;
  font-style: normal;
}

.track,
.mini-track,
.score-track {
  position: relative;
  height: 16px;
  margin: 12px 0;
  background: #edeae5;
  border-radius: 3px;
  overflow: visible;
}

.track-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #f0ece8, #f6c4d5);
  box-shadow: inset 0 0 0 1px #e5bac8;
}

.knob {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 5px solid #b32638;
  background: #fff;
}

.green {
  color: var(--green);
}

.red {
  color: #9e2b3a;
}

.section-title {
  margin-top: 20px;
  color: #555960;
}

.prob-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.prob-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.prob-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prob-card {
  min-height: 96px;
  display: grid;
  place-content: center;
  gap: 3px;
  border: 1px solid #ddd8d4;
  background: #fff;
  text-align: center;
}

.prob-card.hot {
  border: 4px solid var(--pink-deep);
  background: var(--pink-soft);
}

.prob-grid.three .prob-card {
  background: var(--pink-soft);
  border-color: #e6a0b8;
}

.prob-card strong {
  color: var(--pink);
  font-size: 28px;
  line-height: 1;
}

.prob-card span {
  color: #696e77;
  font-weight: 800;
}

.prob-card small {
  color: #a5a8ae;
  font-weight: 800;
}

.trend-note {
  margin: 12px 0 2px;
  text-align: center;
  color: #c9c3bf;
  font-size: 13px;
  font-weight: 800;
}

.review-block {
  margin-top: 14px;
  color: #8b909a;
  font-weight: 800;
}

.review-title {
  color: #686c74;
}

.mini-track {
  height: 18px;
  background: #eeeae5;
}

.mini-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 88px;
  transform: translateX(-50%);
  border: 2px solid var(--pink);
  background: rgba(245, 177, 202, .45);
}

.review-block p {
  margin: 8px 0 0;
  line-height: 1.6;
}

.score-section {
  margin-top: 8px;
}

.score-label b {
  color: #1c3e91;
}

.score-track {
  height: 16px;
  overflow: hidden;
}

.score-track span {
  display: block;
  height: 100%;
  width: 0;
  background: #194bb2;
  border-radius: 3px;
}

.reason-box {
  margin-top: 12px;
  padding: 16px 16px 14px;
  border-left: 5px solid var(--blue);
  background: #f0ede8;
}

.reason-box strong {
  display: block;
  margin-bottom: 10px;
  color: #575b64;
}

.reason-box ul {
  margin: 0;
  padding-left: 22px;
  color: #20232a;
  font-size: 20px;
  line-height: 1.55;
  font-weight: 800;
}

.reason-box li::marker {
  color: var(--blue);
}

.metric-line {
  margin-top: 0;
  color: #656a73;
  font-size: 20px;
  font-weight: 800;
}

.advice {
  margin-top: 0;
  padding: 16px;
  border-left: 5px solid var(--pink);
  background: #fffdfa;
  box-shadow: inset 0 0 0 1px #eee7e2;
}

.advice-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #5e626b;
  font-weight: 900;
}

.advice-head strong {
  display: block;
  color: var(--blue);
  margin-bottom: 12px;
}

.advice-head b {
  display: block;
}

.advice-head > span b {
  color: #b32831;
  display: inline;
}

.component-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.component-grid article {
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid #dedbd7;
  background: #fff;
  text-align: center;
}

.component-grid strong {
  color: var(--green);
  font-size: 28px;
  line-height: 1;
}

.component-grid article::after {
  content: "";
  width: 62%;
  height: 6px;
  background: linear-gradient(90deg, var(--green), var(--green) 72%, #ebe9e5 72%);
  order: 2;
}

.component-grid span {
  color: #626770;
  font-weight: 800;
  font-size: 13px;
}

.component-grid .orange strong {
  color: var(--orange);
}

.component-grid .orange::after {
  background: linear-gradient(90deg, var(--orange), var(--orange) 38%, #ebe9e5 38%);
}

.advice p {
  margin: 12px 0 0;
  color: #454952;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 800;
}

.ai-box {
  margin-top: 0;
  padding: 14px 16px;
  border: 1px solid #d8d5cf;
  border-left: 5px solid #111827;
  background: #f8f8f4;
}

.ai-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #1f2937;
  font-weight: 900;
}

.ai-head span {
  color: var(--blue);
  font-size: 13px;
}

.ai-box p {
  margin: 10px 0 0;
  color: #3d424b;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 800;
  white-space: pre-wrap;
}

.rec-box {
  margin-top: 0;
  padding: 14px 16px;
  border: 1px solid #d8d5cf;
  border-left: 5px solid var(--blue);
  background: #f5f8ff;
}

.rec-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #1f2937;
  font-weight: 900;
}

.rec-head span {
  color: var(--blue);
  font-size: 13px;
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.rec-card {
  display: grid;
  gap: 2px;
  padding: 10px 6px;
  border: 1px solid #c9d4ef;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font: inherit;
}

.rec-card:hover {
  border-color: var(--blue);
  background: #eef3ff;
}

.rec-card strong {
  color: var(--blue);
  font-size: 18px;
  font-weight: 900;
}

.rec-card em {
  font-style: normal;
  font-size: 14px;
  font-weight: 800;
}

.rec-card em.up {
  color: #9e2b3a;
}

.rec-card em.down {
  color: var(--green);
}

.rec-card small {
  color: #878b94;
  font-size: 11px;
  font-weight: 800;
}

.source-line {
  margin-top: 0;
  color: #a4a7ae;
  font-size: 12px;
}

@media (max-width: 900px) {
  .shell {
    width: min(100%, 720px);
  }

  .terminal {
    margin: 16px;
    padding: 20px 20px 16px;
  }

  .terminal-grid {
    display: block;
  }

  .side-panel {
    position: static;
    display: block;
  }

  .metric-line {
    margin-top: 16px;
  }

  .advice {
    margin-top: 14px;
    padding: 16px 0 2px 16px;
    background: transparent;
    box-shadow: none;
  }

  .ai-box,
  .source-line {
    margin-top: 14px;
  }
}

@media (max-width: 580px) {
  .shell {
    width: 100%;
  }

  .notice-bar {
    padding: 0 18px;
  }

  .terminal {
    margin: 12px;
    padding: 18px 16px 14px;
  }

  .top-grid {
    grid-template-columns: 1fr 62px 78px;
    gap: 8px;
  }

  .ticker-line span {
    font-size: 25px;
  }

  .ticker-line strong {
    font-size: 17px;
  }

  .ticker-line em,
  .advice p,
  .metric-line {
    font-size: 16px;
  }

  .signal-row {
    font-size: 14px;
  }

  .score-box strong,
  .prob-box strong {
    font-size: 33px;
  }

  .score-box span,
  .prob-box span,
  .score-box small {
    font-size: 12px;
  }

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

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

  .reason-box ul {
    font-size: 17px;
  }
}
