:root {
  color-scheme: light;
  --bg: #f3f5f1;
  --ink: #18211f;
  --muted: #5b6563;
  --line: rgba(24, 33, 31, 0.14);
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --green: #157153;
  --amber: #a96a1d;
  --cyan: #17778c;
  --shadow: 0 20px 60px rgba(23, 33, 31, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  background:
    linear-gradient(135deg, rgba(21, 113, 83, 0.09), transparent 34rem),
    linear-gradient(45deg, rgba(169, 106, 29, 0.08), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    sans-serif;
  letter-spacing: 0;
  margin: 0;
}

button {
  font: inherit;
}

main {
  margin: 0 auto;
  max-width: 1280px;
  padding: 18px 24px 44px;
}

.hero {
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-height: min(39vh, 390px);
  overflow: hidden;
  position: relative;
}

.hero-art,
.hero-shade {
  inset: 0;
  position: absolute;
}

.hero-art {
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(13, 20, 20, 0.9) 0%, rgba(13, 20, 20, 0.76) 42%, rgba(13, 20, 20, 0.2) 100%),
    linear-gradient(0deg, rgba(21, 113, 83, 0.14), transparent 70%);
}

.language-switch {
  backdrop-filter: blur(12px);
  background: rgba(16, 24, 23, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  position: absolute;
  right: clamp(16px, 2vw, 28px);
  top: clamp(16px, 2vw, 28px);
  z-index: 1;
}

.language-option {
  border-radius: 5px;
  color: rgba(248, 251, 247, 0.78);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  min-width: 72px;
  padding: 11px 12px;
  text-align: center;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.language-option:hover,
.language-option:focus-visible {
  color: #ffffff;
}

.language-option.active {
  background: #eef5ed;
  color: #17322b;
}

.hero-content {
  color: #f8fbf7;
  display: grid;
  gap: 14px;
  max-width: 640px;
  min-height: inherit;
  padding: clamp(28px, 4vw, 52px);
  place-content: end start;
  position: relative;
}

.eyebrow,
.label,
.hero-meta span,
.section-head p {
  color: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.eyebrow {
  color: rgba(248, 251, 247, 0.72);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  letter-spacing: 0;
  line-height: 0.98;
  margin-bottom: 0;
}

.headline {
  color: rgba(248, 251, 247, 0.9);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  margin-bottom: 0;
  max-width: 34rem;
}

.hero-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta div {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-width: 118px;
  padding: 10px 12px;
}

.hero-meta span {
  color: rgba(248, 251, 247, 0.62);
}

.hero-meta strong {
  font-size: 0.96rem;
  font-weight: 700;
}

.hero-meta button {
  background: #eef5ed;
  border: 0;
  border-radius: 8px;
  color: #17322b;
  cursor: pointer;
  font-weight: 800;
  min-height: 58px;
  padding: 0 18px;
  transition: background 180ms ease, transform 180ms ease;
}

.hero-meta button:hover,
.hero-meta button:focus-visible {
  background: #ffffff;
  transform: translateY(-1px);
}

.hero-meta button:disabled {
  cursor: wait;
  opacity: 0.64;
  transform: none;
}

.brief {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  margin-top: 16px;
}

.brief article,
.brief aside {
  backdrop-filter: blur(14px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 108px;
  padding: 20px;
}

.label {
  color: var(--muted);
  margin-bottom: 10px;
}

.brief-copy {
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  line-height: 1.7;
  margin-bottom: 0;
}

.health-check {
  margin-top: 22px;
}

.health-grid {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
}

.health-grid.is-empty {
  grid-template-columns: 1fr;
}

.health-panel,
.health-result-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.health-panel {
  align-content: center;
  display: grid;
  min-height: 172px;
}

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

.health-search-row input {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 1.12rem;
  min-height: 66px;
  min-width: 0;
  padding: 0 14px;
}

.health-search-row input:focus {
  border-color: rgba(23, 119, 140, 0.44);
  outline: 3px solid rgba(23, 119, 140, 0.16);
}

.health-search-row button {
  background: var(--green);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  min-height: 66px;
  min-width: 112px;
  padding: 0 24px;
}

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

.health-result-card {
  display: grid;
  gap: 14px;
}

.health-result-top {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.health-result-top h3 {
  font-size: clamp(1.22rem, 2vw, 1.7rem);
  line-height: 1.08;
  margin: 0;
}

.health-score {
  align-items: baseline;
  color: var(--cyan);
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 950;
}

.health-score span {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.9;
}

.health-score small {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 3px;
}

.health-score-track {
  background: rgba(23, 119, 140, 0.13);
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

#health-score-fill {
  background: linear-gradient(90deg, var(--green), var(--cyan));
  border-radius: inherit;
  display: block;
  height: 100%;
}

.health-summary {
  font-size: 1.02rem;
  line-height: 1.65;
  margin-bottom: 0;
}

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

.health-detail-grid div {
  background: rgba(243, 245, 241, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.health-detail-grid dt {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.health-detail-grid dd {
  margin: 0;
}

.health-detail-grid ul {
  display: grid;
  gap: 7px;
  line-height: 1.55;
  margin: 0;
  padding-left: 1rem;
}

.health-risk-note {
  background: rgba(169, 106, 29, 0.09);
  border: 1px solid rgba(169, 106, 29, 0.2);
  border-radius: 8px;
  color: #6f4313;
  line-height: 1.55;
  margin-bottom: 0;
  padding: 11px 12px;
}

.recommendations {
  margin-top: 26px;
}

.section-head {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

h2 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 0;
}

.section-head p {
  color: var(--muted);
}

.stock-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.stock-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 350px;
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.stock-card:hover,
.stock-card:focus-within {
  border-color: rgba(21, 113, 83, 0.32);
  box-shadow: 0 18px 44px rgba(23, 33, 31, 0.12);
  transform: translateY(-2px);
}

.stock-card-link {
  color: inherit;
  display: grid;
  gap: 16px;
  height: 100%;
  padding: 20px;
  text-decoration: none;
}

.stock-card-link:focus-visible {
  outline: 3px solid rgba(23, 119, 140, 0.45);
  outline-offset: -3px;
}

.stock-top {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.rank {
  align-items: center;
  background: #e4eee7;
  border-radius: 8px;
  color: var(--green);
  display: inline-flex;
  flex: 0 0 42px;
  font-size: 0.92rem;
  font-weight: 900;
  height: 42px;
  justify-content: center;
}

.identity {
  flex: 1;
  min-width: 0;
}

.ticker-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ticker {
  font-size: clamp(1.36rem, 2vw, 1.8rem);
  font-weight: 900;
  line-height: 1;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  max-width: 100%;
  padding: 7px 9px;
}

.company {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
  margin: 8px 0 0;
}

.risk {
  background: rgba(169, 106, 29, 0.12);
  color: var(--amber);
}

.ai-score {
  background: rgba(23, 119, 140, 0.08);
  border: 1px solid rgba(23, 119, 140, 0.2);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.score-head {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.score-head strong {
  color: var(--muted);
  font-size: 0.78rem;
}

.score-head > span {
  color: var(--cyan);
  font-size: 1.28rem;
  font-weight: 950;
  line-height: 1;
}

.score-head small {
  color: var(--muted);
  font-size: 0.72rem;
  margin-left: 2px;
}

.score-track {
  background: rgba(23, 119, 140, 0.14);
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

.score-fill {
  background: linear-gradient(90deg, var(--green), var(--cyan));
  border-radius: inherit;
  display: block;
  height: 100%;
}

.score-reason {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.buy-zone {
  background: rgba(21, 113, 83, 0.08);
  border: 1px solid rgba(21, 113, 83, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 12px 14px;
}

.buy-zone strong {
  color: var(--muted);
  font-size: 0.78rem;
}

.buy-zone-value {
  color: var(--green);
  font-size: 1.04rem;
  font-weight: 900;
  line-height: 1.25;
}

.catalyst {
  background: rgba(169, 106, 29, 0.08);
  border: 1px solid rgba(169, 106, 29, 0.2);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 12px 14px;
}

.catalyst strong {
  color: var(--muted);
  font-size: 0.78rem;
}

.catalyst-value {
  color: #7c4f13;
  font-weight: 800;
  line-height: 1.45;
}

.stock-copy {
  display: grid;
  gap: 10px;
}

.stock-copy p {
  line-height: 1.65;
  margin-bottom: 0;
}

.stock-copy strong {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  margin-bottom: 3px;
}

.watch-item {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.open-analysis {
  align-self: end;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 900;
  justify-self: start;
}

.open-analysis::after {
  content: " ->";
}

.loading-card {
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.82) 40%, rgba(255, 255, 255, 0) 60%),
    rgba(255, 255, 255, 0.66);
  background-size: 200% 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 350px;
  animation: sweep 1.4s linear infinite;
}

.error-card {
  background: #fff4ef;
  border: 1px solid rgba(169, 106, 29, 0.26);
  border-radius: 8px;
  color: #692d17;
  grid-column: 1 / -1;
  line-height: 1.7;
  padding: 22px;
}

@keyframes sweep {
  from {
    background-position: 180% 0;
  }

  to {
    background-position: -20% 0;
  }
}

.analysis-shell {
  max-width: 1180px;
}

.analysis-hero {
  background:
    linear-gradient(120deg, rgba(21, 113, 83, 0.42), transparent 56%),
    linear-gradient(20deg, rgba(169, 106, 29, 0.22), transparent 48%),
    #101817;
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #f8fbf7;
  overflow: hidden;
  padding: clamp(28px, 5vw, 52px);
  position: relative;
}

.analysis-language {
  right: clamp(14px, 2vw, 24px);
  top: clamp(14px, 2vw, 24px);
}

.back-link {
  color: rgba(248, 251, 247, 0.76);
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 42px;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: #ffffff;
}

.analysis-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  max-width: 860px;
}

.analysis-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.analysis-meta span,
.analysis-meta strong {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: inline-flex;
  min-height: 40px;
  padding: 10px 12px;
}

.analysis-meta span {
  background: rgba(255, 255, 255, 0.09);
  border-radius: 8px 0 0 8px;
  color: rgba(248, 251, 247, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
  margin-right: -10px;
  text-transform: uppercase;
}

.analysis-meta strong {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 0 8px 8px 0;
  font-size: 0.94rem;
}

.analysis-status {
  color: var(--muted);
  min-height: 48px;
  padding: 16px 2px 0;
}

.analysis-status p {
  margin-bottom: 0;
}

.analysis-content {
  display: grid;
  gap: 16px;
  margin-top: 6px;
}

.analysis-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 2vw, 24px);
}

.price-view {
  border-left: 5px solid var(--green);
}

.price-view h2,
.analysis-card h2 {
  margin-bottom: 10px;
}

.price-view p:last-child,
.analysis-card p:last-child {
  margin-bottom: 0;
}

.analysis-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.analysis-list {
  display: grid;
  gap: 10px;
  line-height: 1.65;
  margin: 0;
  padding-left: 1.1rem;
}

.quarter-chart {
  background: rgba(23, 119, 140, 0.06);
  border: 1px solid rgba(23, 119, 140, 0.16);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin: 16px 0;
  padding: 16px;
}

.quarter-chart-head {
  display: grid;
  gap: 4px;
}

.quarter-chart-head h3 {
  font-size: 1rem;
  margin: 0;
}

.quarter-chart-head p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.quarter-chart-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quarter-chart-item {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.quarter-chart-top,
.quarter-chart-bottom {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.quarter-chart-top h4 {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
  margin: 0;
}

.quarter-chart-top strong {
  color: var(--cyan);
  flex: 0 0 auto;
  font-size: 1.08rem;
  line-height: 1;
}

.quarter-chart-track {
  background: rgba(23, 119, 140, 0.13);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.quarter-chart-fill {
  background: linear-gradient(90deg, var(--green), var(--cyan));
  border-radius: inherit;
  display: block;
  height: 100%;
}

.quarter-chart-context {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  margin-bottom: 0;
}

.verify-badge {
  background: rgba(169, 106, 29, 0.12);
  border: 1px solid rgba(169, 106, 29, 0.18);
  border-radius: 999px;
  color: var(--amber);
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  padding: 6px 8px;
}

.metric-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.metric-list dt {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
}

.metric-list dd {
  border-bottom: 1px solid var(--line);
  line-height: 1.65;
  margin: -4px 0 0;
  padding-bottom: 10px;
}

.metric-list dd:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.scenario-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scenario-card {
  background: rgba(243, 245, 241, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.scenario-card h3 {
  font-size: 1.08rem;
  margin: 0;
}

.scenario-card ul {
  display: grid;
  gap: 8px;
  line-height: 1.55;
  margin: 0;
  padding-left: 1.08rem;
}

.scenario-range {
  color: var(--amber);
  font-weight: 900;
  line-height: 1.45;
  margin-bottom: 0;
}

.scenario-interpretation {
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
  padding-top: 10px;
}

.analysis-large-copy {
  font-size: 1.06rem;
  line-height: 1.7;
}

.analysis-risk-note {
  background: rgba(169, 106, 29, 0.1);
  border: 1px solid rgba(169, 106, 29, 0.2);
  border-radius: 8px;
  color: #6f4313;
  line-height: 1.6;
  margin-top: 16px;
  padding: 12px 14px;
}

@media (max-width: 760px) {
  main {
    padding: 12px 12px 28px;
  }

  .hero {
    min-height: 420px;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(13, 20, 20, 0.28) 0%, rgba(13, 20, 20, 0.9) 74%),
      linear-gradient(0deg, rgba(21, 113, 83, 0.16), transparent 70%);
  }

  .hero-content {
    padding: 88px 22px 22px;
  }

  .language-switch {
    right: 22px;
    top: 22px;
  }

  .hero-meta,
  .section-head {
    align-items: stretch;
  }

  .hero-meta button {
    min-height: 52px;
    width: 100%;
  }

  .brief,
  .health-grid,
  .health-detail-grid,
  .stock-grid,
  .analysis-grid,
  .scenario-grid,
  .quarter-chart-list {
    grid-template-columns: 1fr;
  }

  .brief article,
  .brief aside,
  .health-panel,
  .health-result-card,
  .stock-card-link {
    padding: 18px;
  }

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

  .health-search-row button {
    width: 100%;
  }

  .stock-card {
    min-height: 0;
  }

  .analysis-hero {
    padding: 88px 22px 24px;
  }

  .analysis-hero h1 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .back-link {
    margin-bottom: 28px;
  }

  .analysis-meta {
    align-items: stretch;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .analysis-meta span {
    margin-right: 0;
  }
}
