: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;
}

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;
}

.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;
  display: grid;
  gap: 16px;
  min-height: 260px;
  padding: 20px;
}

.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);
}

.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;
}

.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: 260px;
  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;
  }
}

@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,
  .stock-grid {
    grid-template-columns: 1fr;
  }

  .brief article,
  .brief aside,
  .stock-card {
    padding: 18px;
  }

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