:root {
  --bg: #07111f;
  --panel: rgba(13, 29, 48, 0.82);
  --panel-solid: #0d1d30;
  --line: rgba(151, 183, 212, 0.16);
  --line-strong: rgba(151, 183, 212, 0.3);
  --text: #eef5fb;
  --muted: #91a8bb;
  --cyan: #53d6c7;
  --cyan-soft: rgba(83, 214, 199, 0.12);
  --amber: #f2ba63;
  --red: #ff7c7c;
  --blue: #79a9ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(109, 142, 169, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 142, 169, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 50% -15%, #173655 0, #07111f 48%);
  background-size: 36px 36px, 36px 36px, auto;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.16;
  pointer-events: none;
}

.ambient-one {
  top: 8%;
  left: -170px;
  background: var(--cyan);
}

.ambient-two {
  right: -180px;
  bottom: 10%;
  background: var(--blue);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(448px, 100%);
  padding: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(19, 40, 63, 0.96), rgba(8, 21, 36, 0.98));
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 24px;
  border: 1px solid rgba(83, 214, 199, 0.55);
  border-radius: 15px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-family: Georgia, "Songti SC", serif;
  font-size: 25px;
}

.login-brand .brand-mark {
  width: 46px;
  height: 46px;
  margin: 0;
  border-radius: 13px;
  font-size: 22px;
}

.login-brand .eyebrow {
  margin-bottom: 2px;
}

.login-brand h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.brand-mark.small {
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 12px;
  font-size: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.eyebrow.accent {
  color: var(--cyan);
}

.login-intro {
  margin: 30px 0 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.login-intro h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 28px;
  font-weight: 550;
  letter-spacing: -0.035em;
}

.login-intro > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #b8cad8;
  font-size: 13px;
  font-weight: 650;
}

.search-row {
  display: flex;
  gap: 10px;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: 0;
  color: var(--text);
  background: rgba(3, 12, 23, 0.58);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(83, 214, 199, 0.12);
}

.search-row button {
  border: 0;
  border-radius: 12px;
  color: #031613;
  background: var(--cyan);
  font-weight: 750;
  box-shadow: 0 10px 30px rgba(83, 214, 199, 0.16);
}

.password-field {
  position: relative;
}

.password-field input {
  height: 50px;
  padding: 12px 70px 12px 14px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  min-width: 52px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(121, 169, 255, 0.08);
  font-size: 12px;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--text);
  background: rgba(121, 169, 255, 0.14);
}

.login-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  color: #031613;
  background: linear-gradient(90deg, #64ddcf, #8ee0d5);
  font-weight: 780;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(83, 214, 199, 0.15);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.login-submit:hover {
  box-shadow: 0 14px 34px rgba(83, 214, 199, 0.22);
  transform: translateY(-1px);
}

.login-submit:active {
  transform: translateY(0);
}

.login-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #6f879a;
  font-size: 11px;
}

.login-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.login-meta i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(83, 214, 199, 0.7);
}

.form-message {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.form-message.error {
  color: var(--red);
}

.app-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

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

.brand h1 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.read-only-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid rgba(83, 214, 199, 0.2);
  border-radius: 999px;
  color: #bcece5;
  background: var(--cyan-soft);
  font-size: 12px;
}

.read-only-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.quiet-button {
  border: 0;
  color: var(--muted);
  background: transparent;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.82fr);
  gap: 36px;
  align-items: end;
  padding: 42px 0 30px;
}

.hero h2 {
  max-width: 580px;
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 550;
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.hero > div > p:last-child {
  max-width: 570px;
  margin: 14px 0 0;
  color: var(--muted);
}

.search-panel {
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-row input {
  padding: 12px 15px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 18px;
  letter-spacing: 0.12em;
}

.search-row button {
  position: relative;
  min-width: 116px;
  padding: 0 18px;
}

.search-row button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.query-history {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.query-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.query-history-head button {
  padding: 2px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}

.query-history-head button:hover {
  color: var(--text);
}

.query-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.query-history-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: rgba(3, 12, 23, 0.42);
  font-size: 11px;
}

.query-history-item:hover {
  border-color: var(--line-strong);
  background: rgba(83, 214, 199, 0.08);
}

.query-history-item:disabled {
  cursor: wait;
  opacity: 0.55;
}

.query-history-item strong {
  overflow: hidden;
  max-width: 92px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.query-history-item span {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.button-loader {
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
  border: 2px solid rgba(3, 22, 19, 0.25);
  border-top-color: #031613;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.candidate-lab {
  margin-bottom: 20px;
  padding: 26px 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(83, 214, 199, 0.06), transparent 46%),
    var(--panel);
}

.candidate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.candidate-head h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 28px;
  font-weight: 550;
  letter-spacing: -0.035em;
}

.candidate-head > div > p:last-child {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

.candidate-head > button {
  flex: 0 0 auto;
  min-width: 154px;
  padding: 12px 18px;
  border: 1px solid rgba(83, 214, 199, 0.35);
  border-radius: 12px;
  color: #031613;
  background: var(--cyan);
  font-weight: 750;
}

.candidate-head > button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.candidate-message {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.candidate-message.error {
  color: #ff9d9d;
}

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

.candidate-metric {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 12, 23, 0.32);
}

.candidate-metric span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.candidate-metric strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.candidate-metric strong.up {
  color: #ff9090;
}

.candidate-metric strong.down {
  color: #62d394;
}

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

.candidate-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 12, 23, 0.38);
}

.candidate-card-head,
.candidate-identity {
  display: flex;
  align-items: center;
}

.candidate-card-head {
  justify-content: space-between;
  gap: 14px;
}

.candidate-identity {
  min-width: 0;
  gap: 10px;
}

.candidate-rank {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(83, 214, 199, 0.25);
  border-radius: 10px;
  color: var(--cyan);
  background: rgba(83, 214, 199, 0.08);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.candidate-identity h3,
.candidate-identity p {
  margin: 0;
}

.candidate-identity h3 {
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-identity p {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.candidate-identity-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
}

.candidate-type {
  padding: 2px 6px;
  border: 1px solid rgba(100, 149, 237, 0.28);
  border-radius: 999px;
  color: #9bbcff;
  background: rgba(100, 149, 237, 0.1);
  font-size: 9px;
  white-space: nowrap;
}

.candidate-type.pullback {
  border-color: rgba(229, 188, 114, 0.3);
  color: #e5bc72;
  background: rgba(229, 188, 114, 0.1);
}

.candidate-score {
  flex: 0 0 auto;
  text-align: right;
}

.candidate-score strong,
.candidate-score span {
  display: block;
}

.candidate-score strong {
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 22px;
}

.candidate-score span {
  color: var(--muted);
  font-size: 9px;
}

.candidate-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}

.candidate-card-metrics .candidate-metric {
  padding: 8px 9px;
}

.candidate-evidence {
  margin-top: 13px;
}

.candidate-evidence h4 {
  margin: 0 0 5px;
  color: #b8cad8;
  font-size: 11px;
}

.candidate-evidence ul,
.candidate-rules ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.candidate-evidence.risk h4 {
  color: #e5bc72;
}

.candidate-analyze-button {
  width: 100%;
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: rgba(121, 169, 255, 0.08);
  font-weight: 700;
}

.candidate-analyze-button:hover {
  border-color: rgba(83, 214, 199, 0.45);
  background: rgba(83, 214, 199, 0.1);
}

.candidate-rules {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
}

.candidate-rules summary {
  cursor: pointer;
  color: #b8cad8;
  font-weight: 700;
}

.candidate-rules ul {
  margin-top: 8px;
}

.candidate-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 12px;
}

.candidate-disclaimer {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(7, 17, 31, 0.58);
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(5, 12px);
  gap: 9px;
  margin-bottom: -50px;
  transform: rotate(45deg);
}

.signal-grid span {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(83, 214, 199, 0.08);
}

.signal-grid span:nth-child(3n) {
  background: rgba(83, 214, 199, 0.24);
}

.report {
  padding-bottom: 50px;
}

.report-head {
  display: grid;
  grid-template-columns: 180px 260px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.stock-summary {
  min-width: 0;
}

.listing-date {
  display: inline-flex;
  margin: 0 0 6px;
  padding: 3px 7px;
  border: 1px solid rgba(151, 183, 212, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(3, 12, 23, 0.24);
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.symbol {
  margin: 0 0 4px;
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.report-head h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 35px;
}

.muted {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.quality-card {
  width: 100%;
}

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

.quality-card strong {
  display: block;
  margin: 2px 0 9px;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}

.quality-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.quality-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.quick-recommendation {
  min-width: 0;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.quick-recommendation-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quick-recommendation h3 {
  margin: 0;
  font-size: 14px;
}

.quick-recommendation .verdict {
  margin: 0;
}

.quick-recommendation p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.recommendation {
  margin: 20px 0;
  padding: 28px 32px;
  border: 1px solid rgba(242, 186, 99, 0.25);
  border-radius: 20px;
  background:
    linear-gradient(120deg, rgba(242, 186, 99, 0.09), transparent 45%),
    var(--panel);
}

.price-history-card {
  margin: 20px 0;
  padding: 26px 30px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(130deg, rgba(83, 214, 199, 0.055), transparent 42%),
    var(--panel);
}

.price-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.price-history-head h3 {
  margin: 0;
  font-size: 21px;
}

.chart-source {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}

.price-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 14px;
}

.price-metrics > div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(3, 12, 23, 0.24);
}

.price-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.price-metrics strong {
  display: block;
  margin-top: 2px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 17px;
}

.price-metrics strong.up {
  color: #ff9090;
}

.price-metrics strong.down {
  color: var(--cyan);
}

.price-metrics small,
.price-metrics a {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.price-metrics a {
  color: #9bbcff;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.price-metrics a:hover {
  color: var(--cyan);
}

.price-chart-shell {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(151, 183, 212, 0.1);
  border-radius: 14px;
  background: rgba(2, 10, 20, 0.3);
}

#price-chart {
  display: block;
  width: 100%;
  height: 260px;
}

.price-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 112px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  background: rgba(5, 15, 27, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font-size: 11px;
  line-height: 1.45;
  pointer-events: none;
  transform: translateY(-100%);
}

.price-tooltip.is-below {
  transform: translateY(0);
}

.price-close-tooltip {
  min-width: 146px;
  padding: 8px 10px;
}

.price-tooltip-date {
  margin-bottom: 4px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.price-tooltip-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  white-space: nowrap;
}

.price-tooltip-value span {
  color: var(--muted);
}

.price-tooltip-value strong {
  font-variant-numeric: tabular-nums;
}

.kline-tooltip {
  min-width: 190px;
  padding: 9px 11px;
}

.kline-tooltip-date {
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.kline-tooltip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.kline-tooltip-metric,
.kline-tooltip-volume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  white-space: nowrap;
}

.kline-tooltip-metric span,
.kline-tooltip-volume span {
  color: var(--muted);
}

.kline-tooltip-metric strong,
.kline-tooltip-volume strong {
  font-variant-numeric: tabular-nums;
}

.kline-tooltip-volume {
  margin-top: 6px;
}

.price-chart-empty {
  min-height: 170px;
  margin: 14px 0 0;
  padding: 70px 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.kline-card {
  margin: 20px 0;
  padding: 26px 30px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(130deg, rgba(121, 169, 255, 0.055), transparent 42%),
    var(--panel);
}

.kline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.kline-head h3 {
  margin: 0;
  font-size: 21px;
}

.kline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 18px 0 12px;
  color: var(--muted);
  font-size: 11px;
}

.kline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kline-legend span::before {
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.kline-legend .candle-up {
  color: #ff8585;
}

.kline-legend .candle-down {
  color: #62d394;
}

.kline-legend .ma5 {
  color: #f2ba63;
}

.kline-legend .ma10 {
  color: #79a9ff;
}

.kline-legend .ma20 {
  color: #c394ff;
}

.kline-chart-shell {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(151, 183, 212, 0.1);
  border-radius: 14px;
  background: rgba(2, 10, 20, 0.3);
}

#kline-chart {
  display: block;
  width: 100%;
  height: 360px;
}

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

.kline-reading-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(3, 12, 23, 0.24);
}

.kline-reading-grid span {
  color: var(--muted);
  font-size: 11px;
}

.kline-reading-grid strong {
  display: block;
  margin-top: 4px;
  color: #dce7f1;
  font-size: 15px;
}

.kline-reading-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.kline-note {
  margin: 13px 0 0;
  color: #71899d;
  font-size: 11px;
}

.recommendation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.recommendation h3,
.category-card h3 {
  margin: 0;
}

.verdict {
  display: inline-flex;
  margin-top: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--amber);
  background: rgba(242, 186, 99, 0.12);
  font-size: 13px;
  font-weight: 750;
}

.guidance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0;
}

.guidance {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 12, 23, 0.28);
}

.guidance span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 750;
}

.guidance p {
  margin: 5px 0 0;
  color: #d2dee8;
  font-size: 14px;
}

.summary {
  margin: 0;
  color: var(--muted);
}

.factor-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 22px;
}

.factor-columns h4 {
  margin: 0 0 9px;
  color: #cbd9e5;
  font-size: 13px;
}

.factor-columns ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

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

.category-card {
  min-width: 0;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.status-chip,
.kind-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.status-chip {
  color: #bad2e4;
  background: rgba(121, 169, 255, 0.1);
}

.finding + .finding {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.finding-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.kind-chip.fact {
  color: var(--cyan);
  background: var(--cyan-soft);
}

.kind-chip.inference {
  color: var(--amber);
  background: rgba(242, 186, 99, 0.11);
}

.kind-chip.unknown {
  color: var(--red);
  background: rgba(255, 124, 124, 0.1);
}

.finding h4 {
  min-width: 0;
  margin: 0;
  font-size: 14px;
}

.finding p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.signed-value {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.signed-value.positive {
  color: #ff8585;
}

.signed-value.negative {
  color: #62d394;
}

.source-list {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.source-link,
.source-text {
  overflow-wrap: anywhere;
  color: #8fb7ec;
  font-size: 12px;
  text-decoration: none;
}

.source-link:hover {
  color: var(--cyan);
  text-decoration: underline;
}

.raw-report {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(3, 12, 23, 0.38);
}

.raw-report summary {
  padding: 16px 20px;
  color: var(--muted);
  cursor: pointer;
}

.raw-report pre {
  max-height: 520px;
  margin: 0;
  padding: 0 20px 20px;
  overflow: auto;
  color: #b7c9d7;
  white-space: pre-wrap;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

footer {
  padding: 28px 0 42px;
  color: #60778a;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 34px;
  }

  .report-head {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .quick-recommendation {
    grid-column: 1 / -1;
    padding: 20px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .category-grid,
  .guidance-grid,
  .factor-columns {
    grid-template-columns: 1fr;
  }

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

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

  .candidate-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    min-height: 74px;
  }

  .read-only-badge {
    display: none;
  }

  .hero {
    padding: 30px 0 24px;
  }

  .hero h2 {
    font-size: 34px;
  }

  .search-panel,
  .candidate-lab,
  .login-card,
  .report-head,
  .recommendation,
  .price-history-card,
  .category-card {
    padding: 20px;
  }

  .search-row {
    flex-direction: column;
  }

  .search-row button {
    min-height: 48px;
  }

  .candidate-head {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  .candidate-head > button {
    min-height: 46px;
  }

  .login-card {
    padding: 26px 22px;
  }

  .login-intro {
    margin-top: 24px;
    padding-top: 23px;
  }

  .login-intro h2 {
    font-size: 25px;
  }

  .report-head {
    align-items: stretch;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .quality-card {
    width: 100%;
  }

  .stock-summary {
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }

  .quick-recommendation {
    grid-column: auto;
  }

  .price-history-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .kline-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #price-chart {
    height: 230px;
  }

  .price-chart-shell {
    min-height: 230px;
  }

  .kline-card {
    padding: 20px;
  }

  .kline-chart-shell {
    min-height: 330px;
  }

  #kline-chart {
    height: 330px;
  }

  .kline-reading-grid {
    grid-template-columns: 1fr;
  }
}
