/* ============================================================
   Home page restyle (body.home only; other pages keep styles.css).
   Idea: the X and O boxes of a Point & Figure chart (the XO logo)
   become the one motif: a giant O behind the hero, X/O bullets,
   X/O as the only chart colours. Flat colour, tone steps instead of
   lines, no shadows at rest, one text face + one display face.
   ============================================================ */

body.home {
  /* one text face; numbers align with tabular figures instead of mono */
  --font-mono: var(--font-body);
  --text-3: #5b6b82;          /* secondary notes: 5.2:1 on the ground */
  --brand: #0a7d63;           /* brand teal, dark enough for text */
  --x: #047857;               /* X column text on light grounds */
  --o: #dc2626;
  --motif: #0e9c7c;           /* flat fill of the giant O */
  --ground: #f8fafc;
  --ground-2: #eef3f2;        /* one tone step: section field */
  --field-line: rgba(15, 30, 25, 0.18);
  --shadow-sm: none;
  --shadow: none;
  --shadow-md: none;
  --shadow-lg: none;
  --line: transparent;
  --line-mid: transparent;
  --panel-border: transparent;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

body.home.dark-mode {
  --text-3: #94a3b8;
  --brand: #10b981;
  --x: #34d399;
  --o: #f87171;
  --motif: #0f6b57;
  --ground: #0b0f17;
  --ground-2: #0f1724;
  --field-line: rgba(255, 255, 255, 0.2);
}

body.home .mono { font-family: var(--font-body); }

/* ---------- Frame: one pair of margins, content fills the width ---------- */
body.home { --wrap-pad: clamp(20px, 3vw, 48px); }

/* ---------- Type ---------- */
body.home h1,
body.home h2 { letter-spacing: -0.03em; }
body.home h2 { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.05; }
body.home .sec-head { margin-bottom: 40px; max-width: none; }
body.home .sec-head .lede { max-width: 62ch; font-size: 18px; line-height: 1.55; color: var(--text); margin-top: 14px; }
body.home .sec-head.center { text-align: left; margin-left: 0; margin-right: 0; max-width: none; }

/* ---------- Sections: a tone step between fields, no rules ---------- */
body.home .section-pad {
  padding: clamp(72px, 8vw, 112px) 0;
  border-bottom: 0;
  background: var(--ground);
}
body.home .section-pad:nth-of-type(even) { background: var(--ground-2); }

/* ---------- Hero ---------- */
body.home .hero-section {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 88px) 0 clamp(56px, 7vw, 96px);
  background: var(--ground);
  border-bottom: 0;
}
/* the giant O: one flat shape, cropped by the top, right and bottom edges */
body.home .hero-motif {
  position: absolute;
  z-index: 0;
  width: min(820px, 62vw);
  aspect-ratio: 1;
  right: -14%;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--motif);
  pointer-events: none;
}
body.home .hero-section .wrap { position: relative; z-index: 1; }
body.home .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 4vw, 64px); }
body.home .hero-content h1 {
  max-width: none;
  font-size: clamp(48px, 5.6vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
body.home .hero-content h1 em { color: var(--brand); }
body.home .hero-content .lede {
  margin-top: 24px;
  max-width: 34em;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text);
}
body.home .hero-actions-group { margin-top: 32px; }

body.home .hero-stats-row { border-top: 0; padding-top: 0; margin-top: 44px; gap: clamp(20px, 3vw, 40px); }
body.home .hero-stat-item b { font-family: var(--font-display); font-size: 32px; letter-spacing: -0.02em; font-weight: 600; }
body.home .hero-stat-item span { font-size: 14px; color: var(--text-2); }

/* ---------- Buttons: flat, one shape (full round), no glow ---------- */
body.home .btn { border-radius: 999px; box-shadow: none; }
body.home .btn-primary { box-shadow: none; }
body.home .btn-ghost { background: var(--ground-2); border-color: transparent; color: var(--text); }
body.home .btn-ghost:hover { background: var(--brand-wash-hover); }
body.home .btn:active { transform: scale(0.97); }

/* ---------- The product fragment keeps its own interface rules (data-ui) ---------- */
body.home .hero-widget[data-ui] {
  border: 1px solid var(--field-line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  border-radius: 16px;
}

/* ---------- Surfaces: tone, not outline ---------- */
body.home .pulse-card,
body.home .post-card,
body.home .academy-card,
body.home .lab-pane-card,
body.home .screener-container,
body.home .lab-container,
body.home .trade-setup-card,
body.home .pattern-card {
  background: var(--panel);
  border-color: transparent;
  box-shadow: none;
  border-radius: 4px;
}
body.home .section-pad:nth-of-type(even) .pulse-card,
body.home .section-pad:nth-of-type(even) .post-card,
body.home .section-pad:nth-of-type(even) .academy-card,
body.home .section-pad:nth-of-type(even) .lab-pane-card,
body.home .section-pad:nth-of-type(even) .trade-setup-card,
body.home .section-pad:nth-of-type(even) .pattern-card { background: var(--panel); }

/* real form fields and tables keep their lines */
body.home input,
body.home select,
body.home textarea,
body.home .screener-table th,
body.home .screener-table td,
body.home details.screener-config { border-color: var(--field-line); }

/* ---------- Academy: X/O bullet instead of index numbers ---------- */
body.home .academy-card h3::before {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin-right: 0.5em;
  border-radius: 50%;
  background: var(--motif);
  vertical-align: 0.05em;
}
body.home .academy-card:nth-child(even) h3::before { border-radius: 0; clip-path: polygon(0 0, 22% 0, 50% 38%, 78% 0, 100% 0, 100% 22%, 62% 50%, 100% 78%, 100% 100%, 78% 100%, 50% 62%, 22% 100%, 0 100%, 0 78%, 38% 50%, 0 22%); }

/* ---------- Motion: reveal each section's parts once, then respect reduced motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  body.home .js-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(.2,.7,.2,1), transform 0.6s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 80ms); }
  body.home .js-reveal.is-in { opacity: 1; transform: none; }
  body.home .hero-motif { animation: motif-in 1.1s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes motif-in { from { transform: translateY(-50%) scale(0.86); opacity: 0; } to { transform: translateY(-50%) scale(1); opacity: 1; } }
  body.home .pulse-card, body.home .post-card, body.home .academy-card { transition: transform 0.2s ease; }
  body.home .pulse-card:hover, body.home .post-card:hover, body.home .academy-card:hover { transform: translateY(-3px); }
}

/* ---------- Phone ---------- */
@media (max-width: 900px) {
  body.home .hero-grid { grid-template-columns: 1fr; }
  body.home .hero-motif { width: 130vw; right: auto; left: 50%; top: auto; bottom: -38vw; transform: translateX(-50%); }
  @media (prefers-reduced-motion: no-preference) {
    body.home .hero-motif { animation-name: motif-in-m; }
    @keyframes motif-in-m { from { transform: translateX(-50%) scale(0.86); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
  }
  body.home .hero-content h1 { font-size: clamp(40px, 12vw, 64px); }
  body.home .hero-stats-row { flex-wrap: wrap; }
}

/* ============================================================
   Pass 2: floor of 13px, body 16px, flat surfaces
   ============================================================ */
body.home .nav-group-header, body.home .nav-badge-live, body.home .nav-badge, body.home .vip-promo-title,
body.home .vip-promo-desc, body.home .ticker-sym, body.home .ticker-price, body.home .ticker-chg,
body.home .search-kbd, body.home .lang-btn, body.home .widget-tab-btn, body.home .signal-pattern-name,
body.home .badge, body.home .pulse-trend span, body.home .filter-group label, body.home .filter-btn small,
body.home .screener-container label, body.home .screener-table th, body.home .lab-metrics-item span,
body.home .lab-controls-pane p, body.home .post-category-tag, body.home .post-card-date,
body.home .cycle-discount-pill, body.home .featured-ribbon, body.home .footer-disclaimer,
body.home .footer-sublinks, body.home .footer-sublinks a, body.home .sentiment-bar-header, body.home .signal-mini-card small,
body.home .screener-container details summary, body.home .screener-container div { font-size: max(13px, 1em); }
body.home .nav-group-header, body.home .nav-badge-live, body.home .nav-badge, body.home .ticker-sym, body.home .ticker-price,
body.home .ticker-chg, body.home .search-kbd, body.home .lang-btn, body.home .widget-tab-btn, body.home .badge,
body.home .pulse-trend span, body.home .filter-group label, body.home .screener-table th, body.home .lab-metrics-item span,
body.home .post-category-tag, body.home .post-card-date, body.home .cycle-discount-pill, body.home .featured-ribbon,
body.home .vip-promo-desc, body.home .signal-pattern-name { font-size: 13px; }
body.home .vip-promo-title, body.home .footer-disclaimer, body.home .footer-sublinks, body.home .footer-sublinks a,
body.home .lab-controls-pane p { font-size: 13px; }
body.home .lab-chart-panes svg text { font-size: 13px; }

body.home .post-card-desc, body.home .academy-card p, body.home .faq-answer, body.home .pricing-features-list li span,
body.home .footer-about, body.home .footer-col a, body.home .footer-col h4, body.home .btn,
body.home .hero-stat-item span, body.home .pricing-amount small { font-size: 16px; line-height: 1.55; }
body.home .nav-item span { font-size: 14px; }
body.home .faq-answer, body.home .post-card-desc, body.home .academy-card p { max-width: 62ch; color: var(--text); }
body.home .btn-sm { font-size: 14px; }

/* hero: wider headline measure, circle stops short of the sentence */
body.home .hero-content h1 { font-size: clamp(44px, 4.8vw, 80px); white-space: normal; }
body.home .hero-motif { width: min(760px, 54vw); right: -20%; }
body.home .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }

/* pricing: Pro is a flat colour field, the others sit on tone; no ribbon outline, no glow */
body.home .plans-grid { gap: 0; }
body.home .pricing-card { background: var(--panel); border-radius: 0; box-shadow: none; border-color: transparent; padding: clamp(24px, 3vw, 40px); }
body.home .pricing-card:hover { box-shadow: none; transform: none; }
body.home .pricing-card.featured { background: var(--brand-dark); color: #fff; box-shadow: none; border-color: transparent; }
body.home .pricing-card.featured h3, body.home .pricing-card.featured .pricing-amount,
body.home .pricing-card.featured .pricing-amount small, body.home .pricing-card.featured li span,
body.home .pricing-card.featured .pricing-card-top p { color: #fff; }
body.home .pricing-card-top p { font-size: 16px; color: var(--text); margin-top: 6px; }
body.home .pricing-card-top h3 { font-size: 28px; }
body.home .pricing-amount { font-family: var(--font-display); font-size: clamp(36px, 3.4vw, 52px); letter-spacing: -0.03em; }
body.home .featured-ribbon { background: #fff; color: var(--brand-dark); border-radius: 999px; box-shadow: none; }

/* sidebar: tone step instead of rules, no glow, flat promo */
body.home .sidebar, body.home .sidebar-header, body.home .sidebar-footer, body.home .top-ticker-bar,
body.home .app-header { border-color: transparent; }
body.home .sidebar { box-shadow: none; background: var(--ground-2); }
body.home .sidebar-support-link { box-shadow: none; }
body.home .vip-promo-box { background: var(--brand-wash); border-color: transparent; }
body.home .btn-primary, body.home .btn-primary:hover { box-shadow: none; }
body.home .btn-primary { background: #c2410c; }       /* 5.2:1 with white text; same orange family as the brand CTA */
body.home .btn-primary:hover { background: #9a3412; }
body.home .btn-brand { background: var(--brand-dark); color: #fff; }

/* text measure */
body.home .sec-head .lede, body.home .hero-content .lede { max-width: 62ch; }
body.home .faq-item, body.home .faq-item summary { border-color: transparent; }
body.home .faq-item { background: var(--panel); border-radius: 4px; margin-bottom: 8px; box-shadow: none; }

/* sideways rows end inside the grid on tablet */
@media (max-width: 900px) {
  body.home .widget-tabs-header { flex-wrap: wrap; overflow-x: visible; }
}

/* hero: facts first, then the action */
body.home .hero-content { display: flex; flex-direction: column; align-items: flex-start; }
body.home .hero-stats-row { order: 3; margin-top: 36px; }
body.home .hero-actions-group { order: 4; margin-top: 36px; }
body.home .hero-content h1 { order: 1; }
body.home .hero-content .lede { order: 2; }

/* pictures: square corners, one treatment, captions at reading size */
body.home figure { margin: 0; }
body.home figure img { display: block; width: 100%; height: auto; border-radius: 0; }
body.home figcaption { font-size: 15px; line-height: 1.5; color: var(--text); margin-top: 12px; max-width: 52ch; }
body.home .home-band { margin: 0 0 44px; }
body.home .home-band img { height: clamp(220px, 28vw, 380px); object-fit: cover; object-position: 50% 62%; }
body.home .home-trio { display: grid; grid-template-columns: 1.5fr 0.9fr 1.2fr; gap: 24px; align-items: start; margin-bottom: 56px; }
body.home .home-trio figure:nth-child(2) img { aspect-ratio: 4 / 5; object-fit: cover; background: #fff; }
body.home .home-trio figure:nth-child(1) img, body.home .home-trio figure:nth-child(3) img { aspect-ratio: 4 / 5; object-fit: cover; }
body.home .home-trio figure:nth-child(1) img { object-position: 30% 50%; }
@media (max-width: 900px) {
  body.home .home-trio { grid-template-columns: 1fr; }
  body.home .home-trio figure img { aspect-ratio: 3 / 2 !important; }
  body.home .hero-content h1 { font-size: clamp(36px, 10.4vw, 56px); }
}
body.home .home-credits { font-size: 13px; line-height: 1.6; color: var(--text-2); max-width: 90ch; margin-bottom: 16px; }
body.home .home-credits a { color: inherit; text-decoration: underline; }

/* pricing: Starter and Premium are open columns on the field, Pro is the one filled plate */
body.home .plans-grid { align-items: stretch; }
body.home .pricing-card:not(.featured) { background: transparent; }

/* inline-styled small text inside the screener and lab */
body.home [style*="font-size:12px"], body.home [style*="font-size: 12px"],
body.home [style*="font-size:11px"], body.home [style*="font-size: 11px"] { font-size: 13px !important; }
body.home .pricing-card { border: 0; }

/* phone and tablet: one column, the circle drops under the text */
@media (max-width: 900px) {
  body.home .hero-grid { grid-template-columns: minmax(0, 1fr); }
  body.home .hero-motif { width: 130vw; right: auto; left: 50%; top: auto; bottom: -46vw; transform: translateX(-50%); }
  body.home .hero-content h1 { font-size: min(10.4vw, 52px); }
  body.home .plans-grid { grid-template-columns: 1fr; }
}

/* market pulse: the figure leads, its name follows */
body.home .pulse-card { display: flex; flex-direction: column; }
body.home .pulse-val { order: 1; font-family: var(--font-display); font-size: clamp(30px, 3vw, 44px); letter-spacing: -0.03em; }
body.home .pulse-title { order: 2; margin-top: 6px; font-size: 16px; }
body.home .pulse-trend { order: 3; margin-top: 10px; }
body.home .nav-badge-live { background: #b91c1c; color: #fff; }
body.home .top-ticker-bar { border: 0; box-shadow: none; background: var(--ground-2); }

body.home .widget-body { min-height: 0; }
body.home .header-search input, body.home .pnf-symbol-search input { padding-right: 64px; }
