:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-alt: #fafbfc;
  --border: #e5e7eb;
  --text: #111827;
  --text-muted: #6b7280;
  --text-subtle: #9ca3af;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #dbeafe;
  --success: #059669;
  --success-soft: #d1fae5;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px rgba(15, 23, 42, 0.05), 0 10px 15px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.08), 0 20px 40px rgba(15, 23, 42, 0.06);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --max-w: 1120px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

img, svg {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a:not(.btn) {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:not(.btn):hover {
  color: var(--text);
}

.site-nav a.btn-primary,
.site-nav a.btn-primary:hover {
  color: #ffffff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: 0.95rem 1.6rem;
  font-size: 1.05rem;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--text-muted);
}

/* ----- Section shell ----- */
section {
  padding: 5rem 0;
}

section.tight {
  padding: 3.5rem 0;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 2.5rem;
}

.section-head-center {
  text-align: center;
}

.section-head-center .section-lead {
  margin-left: auto;
  margin-right: auto;
}

/* ----- Hero ----- */
.hero {
  padding: 5.5rem 0 4rem;
  background:
    radial-gradient(ellipse at top left, rgba(37, 99, 235, 0.06), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(5, 150, 105, 0.05), transparent 60%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  margin: 0 0 1.25rem;
}

.hero-title .accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  line-height: 1.55;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-cta-note {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin: 0.9rem 0 0;
}

/* Mockup card in hero */
.mock-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem 1.5rem;
  font-size: 0.92rem;
  transform: rotate(-1.5deg);
  transition: transform 0.3s ease;
}

.mock-card:hover {
  transform: rotate(0deg) translateY(-4px);
}

.mock-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.mock-symbol {
  font-weight: 700;
  font-size: 1.15rem;
}

.mock-company {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.mock-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
}

.mock-badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.mock-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.04);
}

.mock-row:last-child {
  border-bottom: none;
}

.mock-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.mock-value {
  font-weight: 600;
  font-family: var(--font-mono);
}

.mock-note {
  margin-top: 0.75rem;
  padding: 0.55rem 0.7rem;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.8rem;
  border-radius: 8px;
  line-height: 1.4;
}

.mock-disclaimer {
  margin-top: 0.75rem;
  font-size: 0.72rem;
  color: var(--text-subtle);
  text-align: center;
  font-style: italic;
}

/* ----- The Math ----- */
.math-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.math-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.math-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.math-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 0.85rem;
  color: var(--accent);
}

.math-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
}

.math-value.good {
  color: var(--success);
}

.math-value.bad {
  color: var(--danger);
}

.math-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.math-closing {
  text-align: center;
  font-size: 1.05rem;
  color: var(--text);
  max-width: 640px;
  margin: 0 auto;
  font-weight: 500;
}

/* ----- What you can ask ----- */
.ask-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.ask-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: default;
}

.ask-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft);
}

.ask-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.ask-question {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.85rem;
  line-height: 1.35;
}

.ask-preview {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  line-height: 1.5;
}

.ask-preview .pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.pill-buy { background: var(--success-soft); color: var(--success); }
.pill-sell { background: var(--danger-soft); color: var(--danger); }
.pill-hold { background: #e5e7eb; color: var(--text-muted); }
.pill-bull { background: var(--success-soft); color: var(--success); }
.pill-bear { background: var(--danger-soft); color: var(--danger); }

/* ----- Charts sections ----- */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.chart-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.chart-symbol {
  font-size: 1.15rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.chart-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
}

.chart-canvas-wrap.tall {
  height: 320px;
}

.chart-canvas-wrap.short {
  height: 130px;
}

.chart-canvas-wrap + .chart-canvas-wrap {
  margin-top: 0.5rem;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.chart-caption {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

/* ----- Multi-horizon bars ----- */
.horizon-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 640px;
  margin: 0 auto;
}

.horizon-row {
  display: grid;
  grid-template-columns: 60px 1fr 140px;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.horizon-label {
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text);
}

.horizon-bar-track {
  position: relative;
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.horizon-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.horizon-bar-fill.positive { background: linear-gradient(90deg, #34d399, var(--success)); }
.horizon-bar-fill.negative { background: linear-gradient(90deg, #f87171, var(--danger)); }

.horizon-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: right;
  font-family: var(--font-mono);
}

.horizon-final {
  margin-top: 1.75rem;
  padding: 1.25rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  text-align: center;
  color: var(--accent-hover);
  font-weight: 600;
}

/* ----- Reversal detail ----- */
.reversal-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.reversal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reversal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  align-self: flex-start;
}

.reversal-badge.bearish {
  background: var(--danger-soft);
  color: var(--danger);
}

.reversal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.reversal-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.reversal-stat {
  padding: 0.75rem 0.9rem;
  background: var(--surface-alt);
  border-radius: 8px;
}

.reversal-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.reversal-stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
}

.reversal-interpretation {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}

.reversal-disclaimer {
  font-size: 0.78rem;
  color: var(--text-subtle);
  font-style: italic;
  margin-top: auto;
}

/* ----- How it works ----- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.step-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--accent);
}

.step-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.step-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ----- Trust bar ----- */
.trust-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  text-align: center;
}

.trust-item {
  padding: 0 1rem;
}

.trust-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 0.8rem;
  color: var(--success);
}

.trust-title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.35rem;
}

.trust-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ----- FAQ ----- */
.faq-section {
  padding: 4rem 0 5rem;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.faq-list {
  max-width: 780px;
  margin: 2.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.faq-item[open] {
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-md);
}

.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  color: var(--text);
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item > summary::-webkit-details-marker { display: none; }

.faq-item > summary::after {
  content: "＋";
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.faq-item[open] > summary::after {
  content: "−";
}

.faq-item > p {
  margin: 0;
  padding: 0 1.25rem 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ----- Final CTA ----- */
.final-cta {
  text-align: center;
  padding: 5rem 0 6rem;
}

.final-logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  margin: 0 auto 1.75rem;
  display: block;
}

.final-cta h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.final-cta p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 0 2rem;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-brand img {
  border-radius: 5px;
}

.footer-links {
  display: inline-flex;
  gap: 1.25rem;
  align-items: center;
}

.footer-disclaimer {
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-style: italic;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  section { padding: 3.5rem 0; }
  .hero { padding: 3.5rem 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .mock-card { transform: none; max-width: 400px; margin: 0 auto; }
  .math-grid { grid-template-columns: repeat(2, 1fr); }
  .ask-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; text-align: left; }
  .trust-item { display: flex; align-items: flex-start; gap: 1rem; text-align: left; }
  .trust-item .trust-icon { margin: 0.1rem 0 0 0; flex-shrink: 0; }
  .reversal-grid { grid-template-columns: 1fr; }
  .horizon-row { grid-template-columns: 50px 1fr 110px; padding: 0.75rem 0.85rem; gap: 0.75rem; }
}

@media (max-width: 620px) {
  .site-nav { gap: 0.85rem; }
  .site-nav a:not(.btn) { display: none; }
  .math-grid { grid-template-columns: 1fr 1fr; }
  .ask-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }
  .hero-sub { font-size: 1rem; }
  .chart-card { padding: 1.25rem; }
  .chart-canvas-wrap.tall { height: 260px; }
  .footer-row { flex-direction: column; align-items: center; text-align: center; }
}
