/* ============================================================
   TradingView Download for PC — modern dark fintech design system
   ============================================================ */

:root {
  /* core palette (variable names preserved for inline page styles) */
  --bg: #0a0d14;
  --bg-elev: #131825;
  --card: #141a28;
  --border: #232a3a;
  --border-bright: #313a52;
  --text: #e8ecf4;
  --muted: #8b93a7;
  --accent: #4d7cff;
  --accent-hover: #3d6bef;
  --green: #26de81;
  --red: #fc5d5d;
  --cyan: #22d3ee;
  --warn: #f0b232;

  --glow: rgba(77, 124, 255, .35);
  --max: 1180px;
  --measure: 960px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
  --shadow-glow: 0 8px 30px rgba(77,124,255,.28);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'SFMono-Regular', ui-monospace, 'JetBrains Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--cyan); }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-elev); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border); }

.container { max-width: var(--measure); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- TICKER TAPE STRIP ---------- */
.ticker-wrap {
  border-bottom: 1px solid var(--border);
  background: #070a10;
  min-height: 78px; /* reserve space — prevents CLS when the ticker iframe loads */
}

/* ---------- NAV ---------- */
.nav {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 13, 20, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 24px; max-width: var(--max); margin: 0 auto;
}
.logo {
  font-weight: 800; color: var(--text); font-size: 1.06rem;
  letter-spacing: -.02em; display: flex; align-items: center; gap: 9px;
}
.logo:hover { color: var(--text); }
.logo .dot { color: var(--accent); }
.logo-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #6d4dff);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px var(--glow);
}
.logo-mark svg { width: 15px; height: 15px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--muted); font-size: .93rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent); color: #fff !important; padding: 8px 16px;
  border-radius: var(--radius-sm); font-weight: 600;
}
.nav-cta:hover { background: var(--accent-hover); }

/* ---------- HERO ---------- */
.lp-hero { position: relative; padding: 72px 0 56px; overflow: hidden; }
.hero-glow {
  position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px; pointer-events: none;
  background: radial-gradient(ellipse at center, var(--glow) 0%, transparent 65%);
  opacity: .55; z-index: 0;
}
.lp-hero .container, .lp-hero .container-wide { position: relative; z-index: 1; }

.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
.hero-text { animation: fadeUp .6s ease both; }

.crumb { font-size: .85rem; color: var(--muted); margin-bottom: 16px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--text); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .76rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--cyan); background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .22);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  line-height: 1.1; margin: 0 0 18px; font-weight: 800; letter-spacing: -.035em;
}
h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-sub {
  font-size: 1.13rem; color: var(--muted); max-width: 540px; margin: 0 0 22px;
}
.lp-hero[data-center] .lp-sub { margin-left: auto; margin-right: auto; }

.byline {
  color: var(--muted); font-size: .85rem; margin: 20px 0;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.byline a { color: var(--green); font-weight: 500; }

.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* trust signals under hero CTAs */
.trust-line {
  display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px;
  font-size: .84rem; color: var(--muted);
}
.trust-line span { display: flex; align-items: center; gap: 6px; }
.trust-line svg { width: 15px; height: 15px; color: var(--green); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 1rem; font-family: var(--font);
  cursor: pointer; border: 1px solid transparent;
  transition: transform .08s, background .15s, border-color .15s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5f6dff);
  color: #fff; box-shadow: 0 4px 18px rgba(77,124,255,.32);
}
.btn-primary:hover { color: #fff; box-shadow: 0 6px 26px rgba(77,124,255,.5); }
.btn-ghost {
  background: rgba(255,255,255,.03); color: var(--text);
  border-color: var(--border-bright);
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); background: rgba(77,124,255,.07); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }

/* ---------- SECTIONS ---------- */
section { padding: 46px 0; position: relative; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head p { color: var(--muted); }

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 16px;
  font-weight: 700; letter-spacing: -.025em; line-height: 1.2;
}
h3 { font-size: 1.12rem; margin: 22px 0 9px; font-weight: 600; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; }
li { margin-bottom: 7px; }

/* ---------- WIDGET FRAME ---------- */
.widget-frame {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-card);
}
.widget-frame.chart { height: 460px; }
.widget-frame .tradingview-widget-container,
.widget-frame .tradingview-widget-container__widget { height: 100%; }
.widget-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.widget-bar .dot3 { width: 10px; height: 10px; border-radius: 50%; }
.widget-bar .dot3:nth-child(1) { background: #fc5d5d; }
.widget-bar .dot3:nth-child(2) { background: #f0b232; }
.widget-bar .dot3:nth-child(3) { background: #26de81; }
.widget-bar span { font-size: .8rem; color: var(--muted); margin-left: 6px; }

/* ---------- TRUST BAR ---------- */
.trust-bar {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--bg-elev); padding: 26px 0;
}
.trust-stats {
  display: flex; justify-content: space-around; flex-wrap: wrap; gap: 24px; text-align: center;
}
.trust-stats .stat .num {
  font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(120deg, var(--text), var(--muted));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.trust-stats .stat .lbl { font-size: .82rem; color: var(--muted); }

/* ---------- CARDS ---------- */
.card-prose { max-width: var(--measure); }
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: transform .15s, border-color .15s, box-shadow .2s;
}
.feature-card:hover {
  transform: translateY(-3px); border-color: var(--border-bright);
  box-shadow: var(--shadow-card);
}
.feature-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: linear-gradient(135deg, rgba(77,124,255,.18), rgba(34,211,238,.12));
  border: 1px solid rgba(77,124,255,.25);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.feature-icon svg { width: 21px; height: 21px; color: var(--accent); }
.feature-card h3 { margin: 0 0 7px; font-size: 1.05rem; }
.feature-card p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- STEP CARDS ---------- */
ol.steps { padding-left: 22px; counter-reset: step; }
ol.steps li { margin-bottom: 11px; }
.step-cards { display: grid; gap: 12px; counter-reset: stepc; }
.step-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.step-card .step-n {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #6d4dff); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem;
}
.step-card .step-body { flex: 1; }
.step-card .step-body strong { color: var(--text); }
.step-card p { margin: 4px 0 0; color: var(--muted); font-size: .93rem; }

/* ---------- TABLES ---------- */
table.cmp {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 18px 0 24px; font-size: .94rem;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
table.cmp th, table.cmp td { padding: 12px 15px; text-align: left; }
table.cmp thead th {
  background: var(--bg-elev); font-weight: 600; color: var(--text);
  border-bottom: 1px solid var(--border);
}
table.cmp tbody td { border-bottom: 1px solid var(--border); }
table.cmp tbody tr:last-child td { border-bottom: none; }
table.cmp tbody tr:hover td { background: rgba(77,124,255,.04); }
table.cmp tbody td:first-child { font-weight: 500; }

/* ---------- CONTENT FIGURE ---------- */
.content-fig { margin: 22px 0; }
.content-fig img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
}
.content-fig figcaption {
  font-size: .85rem; color: var(--muted);
  margin-top: 9px; text-align: center;
}

/* ---------- CALLOUTS ---------- */
.callout {
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(77,124,255,.09), rgba(77,124,255,.02));
  padding: 14px 18px; margin: 18px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.callout.warn {
  border-left-color: var(--warn);
  background: linear-gradient(90deg, rgba(240,178,50,.1), rgba(240,178,50,.02));
}
.callout strong { color: var(--text); }

/* ---------- FAQ ---------- */
details {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 10px; background: var(--card);
  transition: border-color .15s;
}
details:hover { border-color: var(--border-bright); }
details[open] { border-color: var(--border-bright); background: var(--bg-elev); }
details summary {
  cursor: pointer; font-weight: 600; list-style: none; outline: none;
  display: flex; align-items: center; gap: 10px;
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: "+"; flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px;
  background: rgba(77,124,255,.12); border: 1px solid rgba(77,124,255,.25);
  color: var(--accent); font-weight: 700; display: flex;
  align-items: center; justify-content: center; font-size: 1rem;
}
details[open] summary::before { content: "\2212"; }
details summary h3 { display: inline; font-size: 1rem; margin: 0; font-weight: 600; }
details p { margin: 12px 0 0; color: var(--muted); }
details p:first-of-type { padding-left: 32px; }

/* ---------- CTA BANNER ---------- */
.cta-banner {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(77,124,255,.16), rgba(34,211,238,.06));
  border: 1px solid rgba(77,124,255,.3);
  border-radius: var(--radius); padding: 44px 28px; margin: 40px auto;
  max-width: var(--max); text-align: center;
}
.cta-banner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, var(--glow), transparent 70%);
  opacity: .4;
}
.cta-banner > * { position: relative; }
.cta-banner h2 { margin-top: 0; }
.cta-banner p { color: var(--muted); }

/* ---------- DISCLOSURE ---------- */
.disclosure {
  font-size: .82rem; color: var(--muted);
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; margin: 22px 0;
}

/* ---------- FOOTER ---------- */
footer {
  border-top: 1px solid var(--border); margin-top: 56px;
  padding: 44px 0 30px; color: var(--muted); font-size: .9rem;
  background: #070a10;
}
.foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 28px;
}
.foot-grid p { font-size: .88rem; margin-top: 10px; }
.foot-grid h3 { font-size: .82rem; color: var(--text); margin: 0 0 12px; text-transform: uppercase; letter-spacing: .05em; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 7px; }
.foot-grid a { color: var(--muted); font-size: .88rem; }
.foot-grid a:hover { color: var(--text); }
.foot-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding-top: 20px; border-top: 1px solid var(--border); font-size: .82rem;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { order: 2; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .lp-hero { padding: 44px 0 36px; }
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .trust-stats { gap: 18px; }
  .trust-stats .stat { flex: 1 1 40%; }
  section { padding: 34px 0; }
}
