:root {
  --bg: #f4efe6;
  --panel: rgba(255, 252, 246, 0.92);
  --panel-strong: #fffaf1;
  --ink: #1d2430;
  --muted: #5f6472;
  --accent: #004f4a;
  --accent-soft: #d7efe8;
  --danger: #b14c2f;
  --warning: #b1820c;
  --line: rgba(29, 36, 48, 0.12);
  --shadow: 0 18px 40px rgba(52, 55, 80, 0.12);
  --deep-shadow: 0 26px 60px rgba(37, 43, 58, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(0, 79, 74, 0.18), transparent 30%),
    linear-gradient(180deg, #f8f2e7 0%, var(--bg) 100%);
}

.page-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

.hero {
  margin-bottom: 24px;
}

.hero h1,
.section-header h2,
.detail-card h3,
.recommendation-hero h2 {
  font-family: "Palatino Linotype", "Book Antiqua", serif;
}

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

.hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 5vw, 5.3rem);
  line-height: 0.92;
  max-width: 860px;
}

.lede {
  width: min(720px, 100%);
  margin-top: 16px;
  font-size: 1.08rem;
  color: var(--muted);
}

.panel,
.result-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel {
  padding: 24px;
  margin-bottom: 20px;
}

.source-guidance {
  margin-top: 20px;
}

.setup-code-block {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(29, 36, 48, 0.06);
  border: 1px solid rgba(29, 36, 48, 0.08);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92rem;
}

.result-card {
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--deep-shadow);
}

.section-header,
.demo-panel-content {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.analysis-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.field input,
.field select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--ink);
  font-size: 1rem;
}

.field-wide {
  grid-column: 1 / -1;
}

.submit-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 0.95rem;
  cursor: pointer;
}

.submit-button {
  background: var(--accent);
  color: white;
}

.secondary-button {
  background: var(--accent-soft);
  color: var(--accent);
}

.status {
  min-height: 24px;
  margin: 12px 4px 0;
  color: var(--muted);
}

.demo-panel {
  padding: 28px;
}

.demo-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.demo-button {
  min-width: 220px;
  font-size: 1rem;
}

.hidden {
  display: none;
}

.alpha-hero-premium {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
  gap: 18px;
  padding: 24px;
  margin-bottom: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(0, 79, 74, 0.18), transparent 35%),
    linear-gradient(135deg, rgba(0, 79, 74, 0.12), rgba(255, 255, 255, 0.76));
  border: 1px solid rgba(0, 79, 74, 0.18);
}

.alpha-hero-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.alpha-score-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

.alpha-score-line h2 {
  margin: 0;
  font-size: clamp(4rem, 10vw, 6.5rem);
  line-height: 0.9;
}

.alpha-hero .alpha-summary {
  margin-top: 14px;
  max-width: 720px;
}

.alpha-hero-side {
  display: grid;
  gap: 14px;
}

.alpha-detail-card {
  height: 100%;
}

.result-meta {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge.buy {
  background: #d8f0d7;
  color: #25603a;
}

.badge.sell {
  background: #f6d6cd;
  color: #8f3920;
}

.badge.hold {
  background: #e3e7ef;
  color: #344055;
}

.badge.wait {
  background: #f2e5ba;
  color: #83650f;
}

.recommendation-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 20px;
  padding: 24px;
  margin-bottom: 18px;
  border-radius: 24px;
  border: 1px solid rgba(29, 36, 48, 0.08);
  background: rgba(255, 255, 255, 0.6);
}

.recommendation-hero.is-buy {
  background: linear-gradient(135deg, rgba(37, 96, 58, 0.12), rgba(255, 255, 255, 0.72));
}

.recommendation-hero.is-sell {
  background: linear-gradient(135deg, rgba(143, 57, 32, 0.12), rgba(255, 255, 255, 0.72));
}

.recommendation-hero.is-wait,
.recommendation-hero.is-hold {
  background: linear-gradient(135deg, rgba(131, 101, 15, 0.12), rgba(255, 255, 255, 0.72));
}

.recommendation-hero h2 {
  margin: 10px 0 6px;
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  line-height: 0.92;
}

.recommendation-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

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

.recommendation-metric,
.metric-card,
.levels-grid article,
.analysis-item,
.detail-card,
.kpi-card,
.trade-plan-grid article {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(29, 36, 48, 0.08);
}

.recommendation-metric span,
.metric-card span,
.levels-grid span,
.analysis-item p,
.trade-plan-grid span,
.kpi-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.recommendation-metric strong {
  font-size: 1.28rem;
}

.detail-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.detail-sections-priority {
  grid-template-columns: 1.15fr 1fr;
}

.trade-plan-card {
  grid-column: 1 / -1;
}

.trade-plan-grid,
.levels-grid,
.dashboard-kpis {
  display: grid;
  gap: 14px;
}

.trade-plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.levels-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 8px;
}

.dashboard-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 8px 0 0;
}

.kpi-card strong {
  font-size: 1.45rem;
}

.detail-card h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.detail-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.levels-grid strong,
.trade-plan-grid strong,
.analysis-item strong {
  font-size: 1.05rem;
}

.alpha-summary,
.reasoning-card p,
.warning-card p,
.compliance-card p {
  color: var(--muted);
  line-height: 1.6;
}

.reasoning-card,
.warning-card,
.compliance-card {
  margin-top: 16px;
}

.warnings-list {
  margin: 0;
  padding-left: 18px;
  color: var(--danger);
}

.alpha-list {
  color: var(--ink);
}

.warnings-list li + li {
  margin-top: 8px;
}

.disclaimer-note {
  margin: 14px 0 0;
  font-size: 0.92rem;
  color: var(--warning);
}

.analyses-list {
  display: grid;
  gap: 12px;
}

.analysis-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.analysis-item button {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .analysis-form,
  .dashboard-kpis,
  .recommendation-metrics,
  .trade-plan-grid,
  .detail-sections,
  .detail-sections-priority,
  .levels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alpha-hero-premium,
  .recommendation-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 20px, 1160px);
    padding-top: 24px;
  }

  .panel,
  .result-card {
    padding: 18px;
    border-radius: 22px;
  }

  .section-header,
  .demo-panel-content,
  .analysis-item,
  .alpha-score-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .analysis-form,
  .dashboard-kpis,
  .recommendation-metrics,
  .trade-plan-grid,
  .detail-sections,
  .detail-sections-priority,
  .levels-grid {
    grid-template-columns: 1fr;
  }

  .alpha-score-line h2 {
    font-size: 4rem;
  }

  .recommendation-hero h2 {
    font-size: 3rem;
  }

  .demo-button {
    width: 100%;
  }
}
