:root {
  color-scheme: light;
  --bg: #f4efe6;
  --surface: rgba(255, 250, 243, 0.92);
  --surface-strong: #fffaf2;
  --ink: #1c1c1c;
  --muted: #5a5650;
  --line: rgba(28, 28, 28, 0.12);
  --accent: #c84c09;
  --accent-soft: #f0b48d;
  --teal: #0f8a8d;
  --gold: #d5a021;
  --shadow: 0 18px 40px rgba(50, 32, 17, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  background:
    linear-gradient(180deg, rgba(244, 239, 230, 0.96), rgba(238, 247, 244, 0.94)),
    #f4efe6;
  color: var(--ink);
}

img {
  display: block;
  width: 100%;
}

button,
select,
textarea {
  font: inherit;
}

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

.hero,
.workspace {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
}

.hero-copy,
.hero-visual,
.panel,
.control-panel,
.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 300px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 1.05;
}

.hero-text {
  margin: 0;
  max-width: 38rem;
  color: var(--muted);
  line-height: 1.75;
}

.hero-visual {
  min-height: 300px;
}

.hero-visual img {
  height: 100%;
  object-fit: cover;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.control-panel {
  padding: 20px;
  position: sticky;
  top: 20px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.auto-status {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: rgba(15, 138, 141, 0.08);
  border: 1px solid rgba(15, 138, 141, 0.14);
}

.auto-status strong {
  display: block;
  margin-bottom: 4px;
}

.auto-status p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(15, 138, 141, 0.14);
}

.field span,
.investor-picks legend,
.panel-header span,
.metric-label {
  color: var(--muted);
  font-size: 0.92rem;
}

textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 12px 14px;
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 220px;
  line-height: 1.65;
}

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

.investor-picks {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.investor-picks label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.primary-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #e06f2f);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.results {
  display: grid;
  gap: 20px;
}

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

.metric {
  padding: 18px;
  min-height: 160px;
}

.metric strong {
  display: block;
  margin: 10px 0;
  font-size: 1.3rem;
}

.metric p,
.panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
}

.panel {
  padding: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 18px;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.gauge {
  position: relative;
  margin-bottom: 14px;
}

.gauge-track {
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #3f8c54 0%, #92b839 35%, #e7a52b 65%, #be3d23 100%);
}

.gauge-fill {
  position: absolute;
  top: -5px;
  width: 18px;
  height: 24px;
  border-radius: 6px;
  background: #111;
  transform: translateX(-50%);
}

.sector-list,
.investor-insights,
.news-feed {
  display: grid;
  gap: 12px;
}

.sector-item,
.insight-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(28, 28, 28, 0.08);
}

.sector-rank {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: var(--teal);
}

.sector-meta strong,
.insight-copy strong {
  display: block;
  margin-bottom: 4px;
}

.stock-watchlist {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

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

.cycle-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(200, 76, 9, 0.12);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

.cycle-note {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.stock-chip {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 250, 243, 0.9);
  border: 1px solid rgba(28, 28, 28, 0.08);
}

.stock-ticker {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(15, 138, 141, 0.12);
  color: var(--teal);
  font-weight: 700;
}

.stock-chip strong {
  margin-bottom: 2px;
  font-size: 0.94rem;
}

.stock-chip p {
  font-size: 0.9rem;
}

.sector-score {
  font-weight: 700;
  color: var(--accent);
}

.investor-panel .insight-item {
  grid-template-columns: 84px 1fr;
}

.insight-item img {
  height: 84px;
  object-fit: cover;
  border-radius: 8px;
}

.news-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(28, 28, 28, 0.08);
}

.news-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}

.news-source {
  font-size: 0.86rem;
  color: var(--accent);
  font-weight: 700;
}

.news-item strong {
  font-size: 1rem;
}

.news-item p {
  margin: 0;
}

.news-link {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 1080px) {
  .workspace,
  .hero,
  .summary-strip,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 14px;
  }

  .hero-copy,
  .control-panel,
  .panel,
  .metric {
    padding: 16px;
  }

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

  .sector-item {
    grid-template-columns: auto 1fr;
  }

  .sector-score {
    grid-column: 2;
  }

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