/* ==========================================================================
   NextTrade Gold EA — shared stylesheet
   Brand: Gold (#C9A227) on deep ink (#0A0B0D)
   Responsive, accessible, performant. No external deps.
   ========================================================================== */

:root {
  --gold: #C9A227;
  --gold-soft: #E3BD48;
  --gold-glow: rgba(201, 162, 39, 0.35);
  --ink: #0A0B0D;
  --ink-2: #111317;
  --ink-3: #1A1D23;
  --ink-4: #242830;
  --cream: #F4F1E8;
  --cream-2: #E8E3D3;
  --grey: #8A8577;
  --grey-2: #5a5548;
  --green: #1DB954;
  --red: #E24B4B;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55);
  --transition: 0.2s cubic-bezier(.4, 0, .2, 1);
  --container: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, Helvetica, Arial, sans-serif;
  color: var(--cream);
  background: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--gold-soft); text-decoration: none; transition: color var(--transition); }
a:hover, a:focus { color: var(--gold); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
  border-radius: 4px;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { padding-left: 24px; }
li { margin: 4px 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.hide-mobile { display: initial; }
.hide-desktop { display: none; }
@media (max-width: 780px) {
  .hide-mobile { display: none; }
  .hide-desktop { display: initial; }
}

/* Skip link for accessibility */
.skip { position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--ink); padding: 8px 14px; font-weight: 700; z-index: 9999; }
.skip:focus { left: 12px; top: 12px; }

/* ========================= Buttons ========================= */
.btn {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .3px;
  text-align: center;
  transition: all var(--transition);
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: var(--ink) !important;
  box-shadow: 0 8px 24px var(--gold-glow);
}
.btn-primary:hover, .btn-primary:focus {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(201, 162, 39, 0.5);
  color: var(--ink) !important;
}
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(244, 241, 232, 0.25);
}
.btn-ghost:hover, .btn-ghost:focus {
  border-color: var(--gold);
  color: var(--gold-soft);
}
.btn-large { padding: 18px 42px; font-size: 17px; }
.btn-block { display: block; width: 100%; }

/* ========================= Nav ========================= */
nav.top {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(10, 11, 13, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(244, 241, 232, 0.08);
}
nav.top .inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.logo {
  font-weight: 800; letter-spacing: 0.3px;
  font-size: 21px;
  color: var(--cream);
}
.logo .gold { color: var(--gold-soft); }
.nav-links {
  display: flex; gap: 28px; list-style: none; padding: 0; margin: 0;
}
.nav-links a {
  color: var(--cream); font-size: 14px; font-weight: 500;
  padding: 6px 2px;
  position: relative;
}
.nav-links a:hover { color: var(--gold-soft); }
.nav-links a.active { color: var(--gold-soft); }
.nav-links a.active::after {
  content: ""; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--gold);
}
.nav-cta {
  background: var(--gold); color: var(--ink) !important;
  padding: 10px 22px; border-radius: 6px;
  font-weight: 700; font-size: 14px;
  transition: all var(--transition);
}
.nav-cta:hover { background: var(--gold-soft); transform: translateY(-1px); }
.menu-toggle {
  display: none;
  width: 34px; height: 34px;
  background: none; border: none; cursor: pointer;
  color: var(--cream);
}
.menu-toggle svg { width: 100%; height: 100%; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .menu-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink-2);
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(244, 241, 232, 0.1);
  }
}

/* ========================= Reusable ========================= */
section { padding: 90px 0; position: relative; }
@media (max-width: 780px) { section { padding: 60px 0; } }

.eyebrow {
  display: inline-block;
  padding: 7px 14px;
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold-soft);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 99px;
  font-size: 12px; letter-spacing: 2px; font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.section-label {
  color: var(--gold-soft);
  font-size: 13px; letter-spacing: 3px;
  text-transform: uppercase; font-weight: 700;
  margin-bottom: 14px;
}
h1 { font-size: clamp(36px, 5.2vw, 64px); font-weight: 800; line-height: 1.05; letter-spacing: -0.015em; }
h2 { font-size: clamp(28px, 3.8vw, 44px); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 18px; }
h3 { font-size: clamp(20px, 2.2vw, 24px); font-weight: 700; line-height: 1.3; }
h4 { font-size: 18px; font-weight: 700; line-height: 1.3; }
.section-lead {
  font-size: 17px; color: var(--cream-2);
  max-width: 700px; margin-bottom: 50px;
}
.gold-text { color: var(--gold-soft); }

/* Reveal animation */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ========================= Hero ========================= */
.hero {
  padding: 90px 0 70px;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(201, 162, 39, 0.15) 0, transparent 60%),
    radial-gradient(900px 450px at 10% 10%, rgba(201, 162, 39, 0.06) 0, transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  overflow: hidden;
}
.hero .grid {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 56px; align-items: center;
}
.hero h1 {
  margin-bottom: 22px;
  text-wrap: balance;         /* modern: auto-balanced line breaks */
  hyphens: manual;            /* don't auto-hyphenate "AI-Powered" */
  overflow-wrap: break-word;  /* fallback: never overflow viewport */
}
.hero h1 .h1-line { display: block; }
.hero h1 .h1-line + .h1-line { margin-top: 6px; }
.nobr { white-space: nowrap; }

@media (max-width: 640px) {
  h1 { font-size: clamp(30px, 8.5vw, 44px); line-height: 1.1; }
  .hero h1 .h1-line + .h1-line { margin-top: 4px; }
}
.hero .lead { font-size: 19px; color: var(--cream-2); max-width: 580px; margin-bottom: 32px; }
.hero-cta-row { display: flex; gap: 14px; margin-bottom: 28px; flex-wrap: wrap; }
.trust-row { display: flex; gap: 22px; flex-wrap: wrap; color: var(--grey); font-size: 13px; }
.trust-row span { position: relative; padding-left: 20px; }
.trust-row span::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--gold-soft); font-weight: 800;
}
@media (max-width: 900px) {
  .hero .grid { grid-template-columns: 1fr; }
}

/* Hero visual (mocked dashboard) */
.hero-visual {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--ink-3);
  border: 1px solid rgba(201, 162, 39, 0.2);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201, 162, 39, 0.08);
  padding: 22px;
}
.hv-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; color: var(--grey); font-size: 12px; }
.hv-top .pair { color: var(--gold-soft); font-weight: 700; letter-spacing: 1px; }
.pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.7);
  animation: pulse 2s infinite;
  margin-right: 6px;
  vertical-align: middle;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(29, 185, 84, 0); }
  100% { box-shadow: 0 0 0 0 rgba(29, 185, 84, 0); }
}
.hv-chart {
  height: 220px; border-radius: 8px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.04) 0, transparent 70%);
}
.hv-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hv-dash {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin-top: 14px; font-size: 12px;
}
.hv-dash .row {
  background: rgba(10, 11, 13, 0.5);
  padding: 9px 12px; border-radius: 6px;
  display: flex; justify-content: space-between;
  border-left: 2px solid var(--gold);
}
.hv-dash .row .k { color: var(--grey); }
.hv-dash .row .v { color: var(--cream); font-weight: 600; }
.hv-dash .row.ok { border-color: var(--green); }
.hv-dash .row.ok .v { color: var(--green); }

/* ========================= EA Dashboard (hero visual) ========================= */
.ea-dash {
  padding: 0 !important;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
}
.ea-dash-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  background: linear-gradient(90deg, #111317 0%, #1A1D23 100%);
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}
.ea-title {
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
  color: var(--gold-soft);
  font-weight: 700; font-size: 13px; letter-spacing: 1.2px;
}
.ea-title .ver {
  color: var(--grey); font-weight: 500;
  margin-left: 8px; font-size: 11px;
}
.ea-status {
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
  color: var(--green);
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  display: flex; align-items: center; gap: 6px;
}
.ea-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 18px;
  background: rgba(10, 11, 13, 0.55);
  border-bottom: 1px dashed rgba(244, 241, 232, 0.08);
  font-size: 11px; color: var(--grey);
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
  letter-spacing: 1px;
}
.ea-meta span:first-child { color: var(--gold-soft); font-weight: 700; }

.ea-chart {
  height: 200px;
  padding: 14px;
  position: relative;
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.025) 0%, transparent 100%);
}
.ea-chart svg { width: 100%; height: 100%; display: block; }

.ea-engines {
  padding: 12px 14px 4px;
  display: flex; flex-direction: column; gap: 8px;
}
.eng-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 13px;
  background: rgba(10, 11, 13, 0.5);
  border-left: 3px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
}
.eng-row.armed { border-color: var(--green); }
.eng-row.waiting { border-color: var(--grey); }
.eng-row .eng-label { color: var(--cream-2); letter-spacing: 0.5px; }
.eng-row .eng-state { font-weight: 800; letter-spacing: 2px; font-size: 11px; }
.eng-row.armed .eng-state { color: var(--green); }
.eng-row.waiting .eng-state { color: var(--grey); }

.ea-filters {
  padding: 10px 14px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.chip {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 10.5px; font-weight: 600;
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
  letter-spacing: 0.5px;
  background: rgba(10, 11, 13, 0.5);
  border: 1px solid rgba(244, 241, 232, 0.08);
  color: var(--cream-2);
}
.chip.pass {
  border-color: rgba(29, 185, 84, 0.4);
  color: var(--green);
  background: rgba(29, 185, 84, 0.06);
}

.ea-order {
  padding: 12px 14px 14px;
  background: rgba(10, 11, 13, 0.65);
  border-top: 1px solid rgba(244, 241, 232, 0.06);
}
.ord-head {
  font-size: 10px; color: var(--grey);
  letter-spacing: 2.5px; font-weight: 700;
  margin-bottom: 8px;
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
}
.ord-body {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
  font-size: 12px;
  align-items: center;
}
.ord-body .side {
  font-weight: 800; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 4px;
  font-size: 11px;
}
.ord-body .side.buy { color: var(--green); background: rgba(29, 185, 84, 0.12); }
.ord-body .side.sell { color: var(--red); background: rgba(226, 75, 75, 0.12); }
.ord-body .stat { color: var(--cream); font-weight: 700; }
.ord-body .sl { color: var(--red); font-weight: 600; }
.ord-body .tp { color: var(--green); font-weight: 600; }

/* --- Animated MT5 chart: candles / levels / markers / cursor --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes drawLine {
  from { stroke-dashoffset: 400; opacity: 0; }
  to   { stroke-dashoffset: 0;   opacity: 0.85; }
}
@keyframes tickPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

.ea-chart .candle {
  opacity: 0;
  animation: fadeIn 0.35s ease-out forwards;
  animation-delay: var(--d, 0s);
}
.ea-chart .candle line,
.ea-chart .candle rect { stroke-width: 1.2; }

.ea-chart .lvl {
  stroke-width: 1;
  stroke-dasharray: 4 4;
  stroke-dashoffset: 400;
  opacity: 0;
  animation: drawLine 0.6s ease-out forwards;
  animation-delay: var(--d, 0s);
}
.ea-chart .r-line { stroke: #1DB954; }
.ea-chart .s-line { stroke: #E24B4B; }

.ea-chart .lvl-tag {
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
  font-size: 7px;
  font-weight: 700;
  text-anchor: end;
  opacity: 0;
  animation: fadeIn 0.35s ease-out forwards;
  animation-delay: var(--d, 0s);
}
.ea-chart .r-tag { fill: #1DB954; }
.ea-chart .s-tag { fill: #E24B4B; }

.ea-chart .marker {
  opacity: 0;
  animation: fadeIn 0.4s ease-out forwards;
  animation-delay: var(--d, 0s);
}
.ea-chart .marker text {
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.ea-chart .marker.sh text { fill: #4FC3F7; }
.ea-chart .marker.sl text { fill: #E24B4B; }

.ea-chart .cursor {
  opacity: 0;
  animation: fadeIn 0.45s ease-out forwards;
  animation-delay: var(--d, 0s);
}

/* --- EA on-chart data panel (mirrors the real overlay text) --- */
.ea-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 14px;
  padding: 12px 18px 6px;
  background: rgba(10, 11, 13, 0.55);
  border-top: 1px dashed rgba(244, 241, 232, 0.08);
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
  font-size: 11.5px;
}
.ea-panel .kv {
  display: flex; justify-content: space-between; align-items: center;
  padding: 3px 0;
  border-bottom: 1px solid rgba(244, 241, 232, 0.04);
}
.ea-panel .kv:last-child,
.ea-panel .kv:nth-last-child(2) { border-bottom: none; }
.ea-panel .k {
  color: var(--grey);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-size: 10px;
}
.ea-panel .v {
  color: var(--cream);
  font-weight: 700;
  letter-spacing: 0.3px;
}
.ea-panel .v.ok   { color: var(--green); }
.ea-panel .v.bull { color: #4FC3F7; }
.ea-panel .mut    { color: var(--grey); font-weight: 500; }
.ea-panel .arrow-down { color: var(--red); font-size: 9px; }

.ea-panel .price-live {
  position: relative;
  padding-right: 14px;
}
.ea-panel .price-live::after {
  content: "";
  position: absolute;
  right: 2px; top: 50%;
  width: 6px; height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--green);
  animation: tickPulse 1.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .ea-chart .candle,
  .ea-chart .lvl,
  .ea-chart .lvl-tag,
  .ea-chart .marker,
  .ea-chart .cursor {
    opacity: 1;
    animation: none;
    stroke-dashoffset: 0;
    transform: none;
  }
  .ea-panel .price-live::after { animation: none; }
}

/* ========================= Proof bar ========================= */
.proof-bar {
  background: var(--ink-2);
  border-top: 1px solid rgba(244, 241, 232, 0.05);
  border-bottom: 1px solid rgba(244, 241, 232, 0.05);
  padding: 32px 0;
}
.proof-bar .grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; text-align: center;
}
.proof-bar .num {
  font-size: 32px; font-weight: 800;
  color: var(--gold-soft); letter-spacing: -0.01em;
}
.proof-bar .lbl {
  font-size: 12px; color: var(--grey);
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-top: 4px;
}
@media (max-width: 780px) {
  .proof-bar .grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* ========================= Problem cards ========================= */
.problem { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); }
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.problem-card {
  background: var(--ink-3); padding: 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(244, 241, 232, 0.06);
  transition: transform var(--transition), border-color var(--transition);
}
.problem-card:hover { transform: translateY(-4px); border-color: rgba(201, 162, 39, 0.25); }
.problem-card .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold-soft);
  border-radius: 10px;
  font-size: 24px;
  margin-bottom: 16px;
}
.problem-card h3 { font-size: 18px; margin-bottom: 10px; color: var(--cream); }
.problem-card p { color: var(--grey); font-size: 15px; }
@media (max-width: 780px) { .problem-grid { grid-template-columns: 1fr; } }

/* ========================= Engine cards ========================= */
.engines { background: var(--ink-2); }
.engine-split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.engine-card {
  position: relative; padding: 38px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--ink-3) 0%, var(--ink) 100%);
  border: 1px solid rgba(201, 162, 39, 0.15);
  overflow: hidden;
}
.engine-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft), transparent);
}
.engine-tag {
  display: inline-block;
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold-soft);
  padding: 5px 12px; border-radius: 4px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 16px;
}
.engine-card h3 { font-size: 24px; margin-bottom: 14px; }
.engine-card p { color: var(--cream-2); margin-bottom: 18px; }
.engine-card ul { list-style: none; padding: 0; }
.engine-card li {
  padding: 8px 0 8px 26px; position: relative;
  color: var(--cream-2); font-size: 15px;
  border-bottom: 1px solid rgba(244, 241, 232, 0.05);
}
.engine-card li:last-child { border-bottom: 0; }
.engine-card li::before {
  content: "→"; position: absolute; left: 0;
  color: var(--gold-soft); font-weight: 700;
}
@media (max-width: 900px) { .engine-split { grid-template-columns: 1fr; } }

/* ========================= Alert fan-out (3 vertical boxes) ========================= */
.alerts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.alert-card {
  background: var(--ink-3);
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: var(--radius-lg);
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.alert-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 162, 39, 0.45);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201, 162, 39, 0.15);
}

.alert-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed rgba(244, 241, 232, 0.08);
}
.alert-badge {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 40px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.alert-badge.tg-badge {
  background: linear-gradient(135deg, #37AEE2 0%, #1E96C8 100%);
}
.alert-badge.mt5-badge {
  background: linear-gradient(135deg, #039BE5 0%, #0277BD 100%);
}
.alert-titles { display: flex; flex-direction: column; line-height: 1.3; }
.alert-titles strong {
  color: var(--cream);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.alert-titles span {
  color: var(--grey);
  font-size: 12px;
  margin-top: 2px;
}

.alert-mock {
  position: relative;
  flex: 1;
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.03) 0%, transparent 100%);
  border-radius: 14px;
  overflow: hidden;
  padding: 8px;
  aspect-ratio: 260 / 400;
}
.alert-mock svg {
  width: 100%;
  height: 100%;
  display: block;
}

.alert-caption {
  color: var(--grey);
  font-size: 12.5px;
  margin-top: 16px;
  text-align: center;
  line-height: 1.5;
  font-style: italic;
}

/* --- Animations inside the alert SVGs --- */

/* Telegram: typing indicator fades out, message slides in */
@keyframes tgFadeOut {
  0%, 72% { opacity: 1; }
  85%     { opacity: 0; }
  100%    { opacity: 0; }
}
@keyframes tgSlideIn {
  0%, 70%  { opacity: 0; transform: translate(-14px, 6px) scale(0.96); }
  85%      { opacity: 1; transform: translate(0, 0) scale(1); }
  100%     { opacity: 1; transform: translate(0, 0) scale(1); }
}
.tg-typing {
  transform-box: fill-box;
  animation: tgFadeOut 2.6s ease-out forwards;
}
.tg-msg {
  transform-box: fill-box;
  transform-origin: left bottom;
  opacity: 0;
  animation: tgSlideIn 3s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

/* MT5 Mobile: push notification slides down, loops every 7s */
@keyframes mt5NotifSlide {
  0%   { opacity: 0; transform: translateY(-90px); }
  8%   { opacity: 1; transform: translateY(0); }
  82%  { opacity: 1; transform: translateY(0); }
  92%  { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 0; transform: translateY(-90px); }
}
.mt5-notif {
  transform-box: fill-box;
  animation: mt5NotifSlide 7s ease-in-out 0.4s infinite;
}
.mt5-notif-old {
  opacity: 0;
  animation: fadeIn 0.8s ease-out 1.6s forwards;
}

/* MT5 Desktop: alert dialog pops in + OK button glows */
@keyframes dlgPopIn {
  0%   { opacity: 0; transform: scale(0.82); }
  65%  { opacity: 1; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes btnGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(227,189,72,0)); }
  50%      { filter: drop-shadow(0 0 5px rgba(227,189,72,0.85)); }
}
.mt5-dlg {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: dlgPopIn 0.65s cubic-bezier(0.2, 1.4, 0.4, 1) 1.1s forwards;
}
.mt5-dlg-btn {
  animation: btnGlow 2.4s ease-in-out 2s infinite;
}

@media (max-width: 900px) {
  .alerts-grid { grid-template-columns: 1fr; gap: 20px; }
  .alert-card { max-width: 380px; margin: 0 auto; }
}
@media (min-width: 901px) and (max-width: 1050px) {
  .alerts-grid { gap: 18px; }
  .alert-card { padding: 18px 16px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .tg-typing { opacity: 0; animation: none; }
  .tg-msg,
  .mt5-notif,
  .mt5-notif-old,
  .mt5-dlg {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .mt5-dlg-btn { animation: none; }
}

/* ========================= Feature grid ========================= */
.filters { background: var(--ink); }
.filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.filter-card {
  background: var(--ink-3); padding: 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(244, 241, 232, 0.06);
  transition: transform var(--transition), border-color var(--transition);
}
.filter-card:hover { transform: translateY(-4px); border-color: rgba(201, 162, 39, 0.3); }
.filter-card .ico {
  width: 46px; height: 46px; border-radius: 10px;
  background: rgba(201, 162, 39, 0.12); color: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px;
}
.filter-card h4 { font-size: 17px; margin-bottom: 8px; }
.filter-card p { color: var(--grey); font-size: 14px; }
@media (max-width: 780px) { .filter-grid { grid-template-columns: 1fr; } }

/* ========================= How (steps) ========================= */
.how { background: var(--ink-2); }
.how-steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-top: 60px;
}
.step {
  padding: 32px 28px; background: var(--ink-3);
  border-radius: var(--radius);
  border: 1px solid rgba(244, 241, 232, 0.06);
  position: relative;
}
.step-num {
  position: absolute; top: -22px; left: 28px;
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
}
.step h4 { margin: 14px 0 10px; font-size: 19px; }
.step p { color: var(--grey); font-size: 15px; }
@media (max-width: 780px) { .how-steps { grid-template-columns: 1fr; } }

/* ========================= Dashboard visual ========================= */
.dash { background: var(--ink); }
.dash-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.dash-visual {
  background: var(--ink-3); padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 162, 39, 0.15);
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
  font-size: 13px;
}
.dash-visual .head {
  color: var(--gold-soft); font-weight: 700; font-size: 13px;
  margin-bottom: 14px; letter-spacing: 1px;
}
.dash-visual .line {
  padding: 6px 0; display: flex; justify-content: space-between;
  border-bottom: 1px dashed rgba(244, 241, 232, 0.08);
}
.dash-visual .line .k { color: var(--grey); }
.dash-visual .line .v { color: var(--cream); }
.dash-visual .line.ok .v { color: var(--green); }
.dash-visual .line.hot .v { color: var(--gold-soft); font-weight: 700; }
.check-list { list-style: none; margin-top: 18px; padding: 0; }
.check-list li {
  padding: 8px 0 8px 26px; position: relative; color: var(--cream-2);
}
.check-list li::before {
  content: "→"; position: absolute; left: 0; color: var(--gold-soft); font-weight: 700;
}
@media (max-width: 900px) { .dash-inner { grid-template-columns: 1fr; } }

/* ========================= Fit cards ========================= */
.fit { background: var(--ink-2); }
.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.fit-card {
  padding: 32px; border-radius: var(--radius);
  background: var(--ink-3);
  border: 1px solid rgba(244, 241, 232, 0.06);
}
.fit-card.yes { border-top: 3px solid var(--green); }
.fit-card.no { border-top: 3px solid var(--red); }
.fit-card h4 { font-size: 20px; margin-bottom: 18px; }
.fit-card ul { list-style: none; padding: 0; }
.fit-card li { padding: 8px 0 8px 28px; position: relative; color: var(--cream-2); font-size: 15px; }
.fit-card.yes li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.fit-card.no li::before { content: "✗"; position: absolute; left: 0; color: var(--red); font-weight: 700; }
@media (max-width: 780px) { .fit-grid { grid-template-columns: 1fr; } }

/* ========================= Pricing ========================= */
.pricing { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.price-grid--single {
  grid-template-columns: 1fr;
  max-width: 460px;
  margin: 0 auto;
}
.price-grid--single .price-card.featured { transform: none; }
.price-card {
  background: var(--ink-3);
  border: 1px solid rgba(244, 241, 232, 0.08);
  padding: 38px 32px; border-radius: var(--radius-lg);
  position: relative;
  transition: transform var(--transition);
}
.price-card.featured {
  border-color: var(--gold);
  background: linear-gradient(180deg, #1A1D23 0%, #15171C 100%);
  transform: scale(1.04);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201, 162, 39, 0.2);
}
.price-card.featured .ribbon {
  position: absolute; top: -12px; right: 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--ink); padding: 6px 14px; border-radius: 4px;
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
}
.price-card h3 {
  font-size: 16px; color: var(--gold-soft);
  letter-spacing: 2px; text-transform: uppercase;
  font-weight: 700; margin-bottom: 12px;
}
.price-amount { font-size: 46px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.price-amount .curr { font-size: 22px; vertical-align: top; color: var(--grey); }
.price-sub { color: var(--grey); font-size: 13px; margin: 8px 0 22px; }
.price-card ul { list-style: none; margin: 24px 0; padding: 0; }
.price-card li {
  padding: 9px 0 9px 26px; position: relative;
  font-size: 14px; color: var(--cream-2);
  border-bottom: 1px dashed rgba(244, 241, 232, 0.06);
}
.price-card li::before {
  content: "✓"; position: absolute; left: 0;
  color: var(--gold-soft); font-weight: 700;
}
.price-card li.off { color: var(--grey); }
.price-card li.off::before { content: "—"; color: var(--grey); }
@media (max-width: 900px) {
  .price-grid { grid-template-columns: 1fr; }
  .price-card.featured { transform: none; }
}

/* ========================= Testimonials ========================= */
.testi { background: var(--ink); }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.testi-card {
  background: var(--ink-3); padding: 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(244, 241, 232, 0.06);
}
.testi-card .stars { color: var(--gold-soft); letter-spacing: 3px; margin-bottom: 12px; font-size: 16px; }
.testi-card q { display: block; color: var(--cream-2); font-size: 15px; font-style: italic; margin-bottom: 14px; }
.testi-card q::before, .testi-card q::after { content: ''; }
.testi-card .who { color: var(--grey); font-size: 13px; }
.testi-card .who strong { color: var(--cream); display: block; font-style: normal; font-weight: 700; }
@media (max-width: 780px) { .testi-grid { grid-template-columns: 1fr; } }

/* ========================= FAQ ========================= */
.faq { background: var(--ink-2); }
.faq-list { max-width: 860px; margin: 0 auto; }
details.q {
  border-bottom: 1px solid rgba(244, 241, 232, 0.08);
  padding: 20px 0;
}
details.q summary {
  list-style: none;
  font-size: 17px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--cream); cursor: pointer;
  padding: 6px 0;
}
details.q summary::-webkit-details-marker { display: none; }
details.q summary::after {
  content: "+"; font-size: 26px; color: var(--gold-soft);
  transition: transform 0.2s;
  line-height: 1;
}
details.q[open] summary::after { content: "−"; }
details.q p { margin-top: 14px; color: var(--cream-2); font-size: 15px; line-height: 1.7; }

/* ========================= Final CTA ========================= */
.final {
  background: radial-gradient(800px 400px at 50% 0%, rgba(201, 162, 39, 0.15) 0, transparent 70%), var(--ink);
  text-align: center;
}
.final h2 { font-size: clamp(32px, 4.5vw, 50px); max-width: 780px; margin: 0 auto 20px; }
.final p { max-width: 620px; margin: 0 auto 32px; color: var(--cream-2); font-size: 18px; }

/* ========================= Page hero (sub-pages) ========================= */
.page-hero {
  padding: 80px 0 60px;
  background: radial-gradient(800px 400px at 50% 0%, rgba(201, 162, 39, 0.12) 0, transparent 70%), var(--ink-2);
  text-align: center;
  border-bottom: 1px solid rgba(244, 241, 232, 0.06);
}
.page-hero h1 { max-width: 820px; margin: 0 auto 20px; }
.page-hero p { color: var(--cream-2); max-width: 640px; margin: 0 auto; font-size: 18px; }
.breadcrumb { font-size: 13px; color: var(--grey); margin-bottom: 20px; }
.breadcrumb a { color: var(--gold-soft); }
.breadcrumb span { margin: 0 8px; color: var(--grey); }

/* ========================= Legal page body ========================= */
.legal-body { max-width: 820px; margin: 0 auto; padding: 70px 24px; color: var(--cream-2); font-size: 16px; line-height: 1.7; }
.legal-body h2 { font-size: 26px; margin: 32px 0 14px; color: var(--cream); }
.legal-body h3 { font-size: 20px; margin: 24px 0 10px; color: var(--cream); }
.legal-body p { margin-bottom: 14px; }
.legal-body ul { margin-left: 20px; margin-bottom: 14px; }
.legal-body .updated { color: var(--grey); font-size: 14px; margin-bottom: 24px; }

/* ========================= Contact form ========================= */
.form-wrap { max-width: 560px; margin: 0 auto; background: var(--ink-3); padding: 36px; border-radius: var(--radius-lg); border: 1px solid rgba(244, 241, 232, 0.06); }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--cream); font-weight: 600; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 12px 14px;
  background: var(--ink-2); color: var(--cream);
  border: 1px solid rgba(244, 241, 232, 0.12);
  border-radius: 8px; font-size: 15px; font-family: inherit;
  transition: border-color var(--transition);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none; border-color: var(--gold);
}
.form-row textarea { resize: vertical; min-height: 120px; }

/* ========================= Footer ========================= */
footer {
  background: #06070A; padding: 60px 0 30px;
  border-top: 1px solid rgba(244, 241, 232, 0.06);
  color: var(--grey); font-size: 13px;
}
footer .grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 36px;
}
footer h5 {
  color: var(--cream); font-size: 14px; margin-bottom: 14px;
  letter-spacing: 1px; text-transform: uppercase;
}
footer ul { list-style: none; padding: 0; }
footer ul li { margin-bottom: 8px; }
footer ul a { color: var(--grey); }
footer ul a:hover { color: var(--gold-soft); }
.badges { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.badge {
  padding: 6px 12px; font-size: 11px; font-weight: 700;
  background: var(--ink-3); color: var(--cream-2);
  border: 1px solid rgba(244, 241, 232, 0.1);
  border-radius: 4px; letter-spacing: 1px; text-transform: uppercase;
}
.risk {
  border-top: 1px solid rgba(244, 241, 232, 0.06);
  padding-top: 24px; font-size: 12px;
  color: var(--grey-2); line-height: 1.7;
}
.copy-line { margin-top: 14px; color: #4a4539; font-size: 12px; }
@media (max-width: 780px) { footer .grid { grid-template-columns: 1fr 1fr; gap: 28px; } }

/* ========================= Pricing page (sub-page specific) ========================= */
.prices { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); padding-top: 60px; }
.price-card .price {
  font-size: 46px; font-weight: 800; letter-spacing: -0.02em; line-height: 1;
  margin: 10px 0 22px;
}
.price-card .price .curr { font-size: 22px; vertical-align: top; color: var(--grey); margin-right: 2px; }
.price-card .price .per { font-size: 14px; color: var(--grey); font-weight: 500; margin-left: 8px; letter-spacing: 0; }
.price-card .ribbon {
  position: absolute; top: -12px; right: 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--ink); padding: 6px 14px; border-radius: 4px;
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
}
.btn-outline {
  background: transparent;
  color: var(--cream) !important;
  border: 1.5px solid rgba(244, 241, 232, 0.3);
}
.btn-outline:hover, .btn-outline:focus {
  border-color: var(--gold);
  color: var(--gold-soft) !important;
}

/* ========================= Generic FAQ (non-.q) ========================= */
.faq-list details {
  border: 1px solid rgba(244, 241, 232, 0.08);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 0;
  background: var(--ink-3);
  transition: border-color var(--transition);
}
.faq-list details[open] { border-color: rgba(201, 162, 39, 0.3); }
.faq-list details summary {
  list-style: none;
  padding: 18px 22px;
  font-size: 16px; font-weight: 600;
  color: var(--cream); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px;
}
.faq-list details summary::-webkit-details-marker { display: none; }
.faq-list details summary::after {
  content: "+"; font-size: 24px; color: var(--gold-soft);
  line-height: 1; transition: transform 0.2s;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list .faq-body {
  padding: 0 22px 20px;
  color: var(--cream-2); font-size: 15px; line-height: 1.7;
}
.faq-list .faq-body p { margin: 0; }
.faq-list code {
  background: var(--ink); color: var(--gold-soft);
  padding: 2px 6px; border-radius: 4px;
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
  font-size: 13px;
}

/* ========================= Contact page ========================= */
.contact-wrap { background: var(--ink); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px; margin-bottom: 56px;
}
.contact-card {
  background: var(--ink-3); padding: 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(244, 241, 232, 0.06);
}
.contact-card h3 { font-size: 17px; margin-bottom: 10px; color: var(--cream); }
.contact-card p { color: var(--grey); font-size: 14px; margin-bottom: 12px; }
.link-gold { color: var(--gold-soft); font-weight: 600; word-break: break-all; }
.link-gold:hover { color: var(--gold); }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }

/* --- Footer social icons (circle buttons) --- */
.socials {
  display: flex; gap: 10px;
  margin-top: 16px;
}
.socials a {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(244, 241, 232, 0.04);
  border: 1px solid rgba(244, 241, 232, 0.08);
  color: var(--grey);
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.socials a:hover {
  background: rgba(201, 162, 39, 0.12);
  border-color: rgba(201, 162, 39, 0.4);
  color: var(--gold-soft);
  transform: translateY(-2px);
}

/* --- Inline social links (contact-card "Follow us") --- */
.socials-inline {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 4px;
}
.social-link {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--gold-soft); font-weight: 600;
  padding: 6px 0; font-size: 15px;
}
.social-link svg { flex-shrink: 0; opacity: 0.9; }
.social-link:hover { color: var(--gold); }

.contact-form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.contact-form .field { display: flex; flex-direction: column; gap: 6px; }
.contact-form label {
  font-size: 14px; font-weight: 600; color: var(--cream);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%; padding: 12px 14px;
  background: var(--ink-2); color: var(--cream);
  border: 1px solid rgba(244, 241, 232, 0.12);
  border-radius: 8px; font-size: 15px; font-family: inherit;
  transition: border-color var(--transition);
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--gold);
}
.contact-form textarea { resize: vertical; min-height: 140px; }

/* Honeypot: invisible to users, bots fill it and get rejected by FormSubmit */
.contact-form .hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* Success banner shown after FormSubmit redirect (URL hash = #message-sent) */
.sent-banner { display: none; }
.sent-banner:target {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 18px 0 24px;
  padding: 16px 18px;
  background: rgba(29, 185, 84, 0.08);
  border: 1px solid rgba(29, 185, 84, 0.35);
  border-left: 3px solid var(--green);
  border-radius: 8px;
  color: var(--cream);
}
.sent-banner .sent-icon {
  flex: 0 0 28px; width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--green); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  margin-top: 2px;
}
.sent-banner strong { color: var(--cream); font-size: 15px; }
.sent-banner p { margin: 4px 0 0; font-size: 14px; color: var(--cream-2); }

/* ========================= Chart visualizations ========================= */
.viz { background: var(--ink); }
.viz-wrap {
  background: var(--ink-3);
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 30px auto 0;
  box-shadow: var(--shadow-lg);
  max-width: 960px;     /* keeps chart aligned with readable text width */
}
.viz-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.viz-head .pair {
  color: var(--gold-soft); font-weight: 700; letter-spacing: 1.5px;
  font-size: 13px;
}
.viz-head .tf {
  color: var(--grey); font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
}
.viz svg {
  width: 100%;
  height: auto;
  max-height: 520px;    /* prevents chart from ballooning vertically */
  display: block;
  margin: 0 auto;
}

/* --- Animated reveal for pieces inside the viz SVGs --- */
.viz .viz-el {
  opacity: 0;
  transform: translateY(4px);
  animation: fadeIn 0.55s ease-out forwards;
  animation-delay: var(--d, 0s);
  transform-box: fill-box;
}

/* Swing-low dot gets a subtle gold pulse to anchor the eye */
.viz .c-swing .c-swing-dot {
  transform-origin: 324px 248px;
  transform-box: view-box;
  animation: swingPulse 2.4s ease-in-out infinite;
  animation-delay: 2.6s;
}
@keyframes swingPulse {
  0%, 100% { r: 6; opacity: 1; }
  50%      { r: 9; opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .viz .viz-el {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .viz .c-swing .c-swing-dot { animation: none; }
}
.viz-legend {
  display: flex; gap: 22px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 18px;
  border-top: 1px dashed rgba(244, 241, 232, 0.1);
  font-size: 13px; color: var(--cream-2);
}
.viz-legend .dot {
  display: inline-block; width: 12px; height: 12px;
  border-radius: 3px; vertical-align: middle; margin-right: 8px;
}
.viz-legend .swatch-buy { background: var(--green); }
.viz-legend .swatch-sell { background: var(--red); }
.viz-legend .swatch-sl { background: repeating-linear-gradient(90deg, var(--red), var(--red) 4px, transparent 4px, transparent 8px); }
.viz-legend .swatch-tp { background: repeating-linear-gradient(90deg, var(--green), var(--green) 4px, transparent 4px, transparent 8px); }
.viz-legend .swatch-gold { background: rgba(201, 162, 39, 0.4); }

.viz-caption {
  color: var(--grey); font-size: 14px;
  margin-top: 14px; text-align: center;
  font-style: italic;
}

.viz-split {
  display: grid; grid-template-columns: 2fr 1fr;
  gap: 24px; align-items: start; margin-top: 30px;
}
@media (max-width: 900px) { .viz-split { grid-template-columns: 1fr; } }

/* --- Two-column box: text + SVG, stacks on mobile --- */
.viz-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 32px;
  align-items: center;
  max-width: 1140px;
}
.viz-row-text-right { grid-template-columns: 1.35fr 1fr; }
.viz-row .viz-text { order: 1; }
.viz-row .viz-media { order: 2; }
.viz-row-text-right .viz-media { order: 1; }
.viz-row-text-right .viz-text  { order: 2; }

.viz-text h3 {
  font-size: 26px; line-height: 1.2;
  color: var(--cream);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.viz-text p {
  color: var(--cream-2);
  font-size: 16px; line-height: 1.65;
  margin: 0 0 18px;
}
.viz-text p strong { color: var(--gold-soft); font-weight: 700; }

.viz-list {
  list-style: none;
  padding: 0; margin: 0 0 18px;
}
.viz-list li {
  position: relative;
  padding: 9px 0 9px 26px;
  color: var(--cream-2);
  font-size: 15px; line-height: 1.5;
  border-bottom: 1px dashed rgba(244, 241, 232, 0.06);
}
.viz-list li:last-child { border-bottom: none; }
.viz-list li::before {
  content: "→";
  position: absolute; left: 0; top: 9px;
  color: var(--gold-soft); font-weight: 800;
}

.viz-legend-mini {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(244, 241, 232, 0.08);
  font-size: 12px; color: var(--grey);
}
.viz-legend-mini .dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 2px; vertical-align: middle;
  margin-right: 6px;
}
.viz-legend-mini .swatch-buy  { background: var(--green); }
.viz-legend-mini .swatch-sell { background: var(--red); }
.viz-legend-mini .swatch-gold { background: rgba(201, 162, 39, 0.55); }
.viz-legend-mini .swatch-sl   { background: repeating-linear-gradient(90deg, var(--red), var(--red) 3px, transparent 3px, transparent 6px); }
.viz-legend-mini .swatch-tp   { background: repeating-linear-gradient(90deg, var(--green), var(--green) 3px, transparent 3px, transparent 6px); }

.viz-media { min-width: 0; } /* prevents SVG overflow in grid */

@media (max-width: 900px) {
  .viz-row,
  .viz-row-text-right { grid-template-columns: 1fr; gap: 22px; }
  .viz-row .viz-text,
  .viz-row-text-right .viz-text  { order: 2; }
  .viz-row .viz-media,
  .viz-row-text-right .viz-media { order: 1; }
}

/* --- Looping glow on entry markers so the chart feels alive --- */
.viz .c-entry,
.viz .h-entry {
  animation: fadeIn 0.55s ease-out forwards, entryBreath 2.4s ease-in-out infinite;
  animation-delay: var(--d, 0s), calc(var(--d, 0s) + 0.8s);
}
@keyframes entryBreath {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(29, 185, 84, 0)); }
  50%      { filter: drop-shadow(0 0 5px rgba(29, 185, 84, 0.7)); }
}
@media (prefers-reduced-motion: reduce) {
  .viz .c-entry,
  .viz .h-entry { animation: none; filter: none; }
}

/* ========================= 404 page ========================= */
.err-wrap {
  min-height: 70vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 80px 24px;
  background: radial-gradient(700px 400px at 50% 30%, rgba(201, 162, 39, 0.12) 0, transparent 70%), var(--ink);
}
.err-wrap .code {
  font-size: clamp(80px, 16vw, 160px);
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1; letter-spacing: -0.03em;
  margin-bottom: 16px;
}

/* ========================= Utility ========================= */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--gold); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  opacity: 0; visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  cursor: pointer; border: none; z-index: 999;
  box-shadow: 0 8px 20px var(--gold-glow);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--gold-soft); }

/* ========================= Blog ========================= */
.blog-hero {
  padding: 120px 0 60px;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(201, 162, 39, 0.08), transparent 60%);
}
.blog-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.blog-hero p {
  color: var(--cream-2);
  max-width: 640px; margin: 0 auto;
  font-size: 1.1rem;
}
.blog-section { padding: 40px 0 100px; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  list-style: none;
  padding: 0;
}
.blog-grid li { margin: 0; }
.blog-card {
  background: var(--ink-2);
  border: 1px solid var(--ink-4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
  height: 100%;
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.blog-card-link {
  display: flex; flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.blog-card-link:hover, .blog-card-link:focus { color: inherit; }
.blog-thumb {
  width: 100%;
  height: 180px;
  display: block;
  object-fit: cover;
  background: linear-gradient(135deg, var(--ink-3), var(--ink-4));
  border-bottom: 1px solid var(--ink-4);
}
.blog-body {
  padding: 20px 22px 24px;
  display: flex; flex-direction: column;
  flex: 1;
}
.blog-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 0.8rem; color: var(--grey);
  margin-bottom: 10px;
  align-items: center;
}
.blog-cat {
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold-soft);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.blog-card h2 {
  font-size: 1.15rem;
  font-weight: 700; line-height: 1.3;
  margin: 0 0 10px;
  color: var(--cream);
}
.blog-card p {
  color: var(--cream-2);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 16px;
  flex: 1;
}
.blog-more {
  color: var(--gold-soft);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: auto;
}
.blog-card:hover .blog-more { color: var(--gold); }

/* ========================= Article ========================= */
.article { padding-bottom: 60px; }
.article-hero {
  padding: 110px 0 30px;
  background: radial-gradient(ellipse at top, rgba(201, 162, 39, 0.06), transparent 60%);
}
.breadcrumb {
  font-size: 0.85rem; color: var(--grey);
  margin-bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center;
}
.breadcrumb a { color: var(--grey); }
.breadcrumb a:hover { color: var(--gold-soft); }
.breadcrumb span { color: var(--grey-2); }
.article-meta-top {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center;
  font-size: 0.85rem; color: var(--grey);
  margin-bottom: 18px;
}
.article-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  max-width: 820px;
}
.article-lead {
  font-size: 1.2rem;
  color: var(--cream-2);
  line-height: 1.55;
  max-width: 760px;
}
.article-image {
  max-width: 980px;
  margin: 30px auto 0;
  padding: 0 20px;
}
.article-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  background: var(--ink-2);
}
.article-body {
  max-width: 760px;
  padding-top: 30px;
  font-size: 1.05rem;
  line-height: 1.75;
}
.article-body p { margin: 0 0 20px; color: var(--cream); }
.article-body h2 {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 44px 0 16px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--cream);
}
.article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--cream);
}
.article-body ul, .article-body ol {
  margin: 0 0 22px; padding-left: 24px;
}
.article-body li { margin: 8px 0; color: var(--cream); }
.article-body strong { color: var(--cream); font-weight: 700; }
.article-body em { color: var(--cream-2); font-style: italic; }
.article-body code {
  background: var(--ink-3);
  color: var(--gold-soft);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.92em;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
.article-body a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.article-body a:hover { color: var(--gold); }
.article-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 20px;
  margin: 22px 0;
  color: var(--cream-2);
  font-style: italic;
}

@media (max-width: 640px) {
  .blog-hero { padding: 100px 0 40px; }
  .article-hero { padding: 90px 0 20px; }
  .article-body { font-size: 1rem; }
  .article-body h2 { font-size: 1.4rem; margin-top: 36px; }
  .article-body h3 { font-size: 1.15rem; }
}
