/* The public site: landing, pricing, tools, docs, legal, blog. Dark, in the
   chart's palette (TradingView's), so the site and the app feel like one. */
:root {
  color-scheme: dark;
  --bg: #131722; --bg-2: #1e222d; --bg-3: #2a2e39; --border: #2a2e39; --border-2: #363a45;
  --text: #d1d4dc; --text-strong: #ffffff; --muted: #787b86; --muted-2: #b2b5be;
  --up: #22ab94; --down: #f7525f; --blue: #2962ff; --blue-2: #1e53e5; --amber: #ff9800;
  --radius: 8px; --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body.site { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--text-strong); }
h1, h2, h3 { color: var(--text-strong); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
code { background: var(--bg-2); border: 1px solid var(--border); border-radius: 4px; padding: 0.1em 0.35em; font-size: 0.92em; }
pre { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; }
.container-x { max-width: var(--max); margin: 0 auto; padding-inline: 20px; }
.muted { color: var(--muted); }
.up { color: var(--up); } .down { color: var(--down); }
.btn-primary, .btn-secondary { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.2rem; border-radius: var(--radius); font-weight: 650; text-decoration: none; border: 1px solid transparent; white-space: nowrap; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-2); }
.btn-secondary { background: transparent; color: var(--text-strong); border-color: var(--border-2); }
.btn-secondary:hover { background: var(--bg-2); }
.btn-lg { padding: 0.9rem 1.5rem; font-size: 1.05rem; }

/* nav */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(19, 23, 34, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-nav { display: flex; align-items: center; gap: 1.5rem; height: 62px; }
.site-logo { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.2rem; text-decoration: none; color: var(--text-strong); letter-spacing: -0.01em; }
/* The mark's letters are currentColor, so they take the header's own
   colour in either theme; only its trend stays green. */
.site-mark { flex: 0 0 auto; display: block; }
.site-links { display: flex; gap: 1.25rem; list-style: none; margin: 0 auto 0 0; padding: 0; }
.site-links a { color: var(--muted-2); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.site-links a:hover, .site-links a[aria-current] { color: var(--text-strong); }
.site-cta { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.nav-signin { color: var(--muted-2); text-decoration: none; font-weight: 500; }
.nav-signin:hover { color: var(--text-strong); }
.nav-toggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; margin-left: auto; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; }
@media (max-width: 860px) {
  .site-nav { flex-wrap: wrap; height: auto; padding-block: 12px; }
  .nav-toggle { display: block; }
  .site-links { display: none; width: 100%; flex-direction: column; gap: 0.6rem; padding-top: 0.5rem; }
  .site-links.open { display: flex; }
  .site-cta { width: 100%; justify-content: flex-start; margin-left: 0; }
}

/* hero */
.hero { padding: 72px 0 32px; text-align: center; }
.hero-kicker { display: inline-block; color: var(--up); font-weight: 650; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1rem; }
.hero h1 { max-width: 860px; margin-inline: auto; }
.hero h1 em { font-style: normal; color: var(--up); }
.hero-sub { max-width: 640px; margin: 1rem auto 1.75rem; color: var(--muted-2); font-size: 1.15rem; }
.hero-ctas { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.hero-fine { color: var(--muted); font-size: 0.9rem; margin-top: 0.9rem; }
.hero-shot { margin: 40px auto 0; max-width: var(--max); padding-inline: 20px; }
.hero-shot .frame { border: 1px solid var(--border-2); border-radius: 12px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); background: var(--bg); }
.hero-shot img { display: block; width: 100%; height: auto; }
.frame-live { height: clamp(620px, 78vh, 860px); }
.frame-live iframe { display: block; width: 100%; height: 100%; border: 0; background: #131722; }
@media (max-width: 760px) { .frame-live { height: 560px; } }

/* live strip */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-2); overflow: hidden; }
.strip-inner { display: flex; gap: 2rem; padding: 0.6rem 20px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.strip-inner::-webkit-scrollbar { display: none; }
/* Rolling: two copies of the run glide left; hovering pauses it. */
.strip.is-rolling .strip-inner { overflow: hidden; padding-inline: 0; }
.strip-run { display: flex; gap: 2rem; padding-right: 2rem; flex: none; animation: strip-roll 60s linear infinite; }
.strip.is-rolling:hover .strip-run { animation-play-state: paused; }
@keyframes strip-roll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .strip-run { animation: none; } .strip.is-rolling .strip-inner { overflow-x: auto; } }
.strip-item b { color: var(--text-strong); margin-right: 0.4rem; font-weight: 650; }
.strip-item span { margin-left: 0.35rem; }

/* sections */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-label { color: var(--up); font-weight: 650; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.6rem; }
.section-lead { color: var(--muted-2); max-width: 640px; font-size: 1.08rem; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 2rem; }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.section-alt .card { background: var(--bg); }
.card h3 { margin-bottom: 0.4rem; }
.card p { margin: 0; color: var(--muted-2); font-size: 0.97rem; }
.card-icon { width: 36px; height: 36px; border-radius: 8px; background: rgba(41, 98, 255, 0.15); color: #7a9cff; display: grid; place-items: center; margin-bottom: 0.9rem; font-weight: 700; }
.steps { counter-reset: step; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 2rem; }
.step { position: relative; padding: 1.4rem 1.4rem 1.4rem 4rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 1.2rem; top: 1.3rem; width: 32px; height: 32px; border-radius: 50%; background: var(--up); color: #0b0f17; font-weight: 800; display: grid; place-items: center; }
.step h3 { margin-bottom: 0.3rem; }
.step p { margin: 0; color: var(--muted-2); }

/* comparison table */
.table-wrap { overflow-x: auto; margin-top: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); }
table.cmp { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px; }
table.cmp th, table.cmp td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.cmp th { background: var(--bg-2); color: var(--text-strong); font-weight: 650; }
table.cmp tr:last-child td { border-bottom: 0; }
table.cmp td.yes { color: var(--up); font-weight: 650; }
table.cmp td.no { color: var(--muted); }
table.cmp td.hl { color: var(--text-strong); font-weight: 650; }

/* pricing */
.price-card { max-width: 520px; margin: 2rem auto 0; background: var(--bg); border: 1px solid var(--border-2); border-radius: 12px; padding: 2rem; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
.price-toggle { display: inline-flex; border: 1px solid var(--border-2); border-radius: 999px; padding: 3px; margin-bottom: 1.25rem; }
.price-toggle button { border: 0; background: none; color: var(--muted-2); padding: 0.4rem 1rem; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.price-toggle button[aria-pressed="true"] { background: var(--bg-3); color: var(--text-strong); }
.price-amount { font-size: 3.2rem; font-weight: 800; color: var(--text-strong); line-height: 1; }
.price-amount small { font-size: 1rem; font-weight: 500; color: var(--muted-2); margin-left: 0.3rem; }
.price-save { color: var(--up); font-weight: 650; font-size: 0.9rem; min-height: 1.4em; margin-top: 0.4rem; }
.price-list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 0.55rem; }
.price-list li { padding-left: 1.6rem; position: relative; color: var(--text); }
.price-list li::before { content: "✓"; position: absolute; left: 0; color: var(--up); font-weight: 800; }
.price-fine { color: var(--muted); font-size: 0.88rem; margin-top: 1rem; }

/* faq */
.faq { max-width: 760px; margin: 0 auto; }
.faq-list { margin-top: 1.5rem; }
.faq details { border-bottom: 1px solid var(--border); padding: 0.9rem 0; }
.faq summary { cursor: pointer; font-weight: 650; color: var(--text-strong); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0.7rem 0 0; color: var(--muted-2); }

/* cta band */
.cta-band { text-align: center; padding: 72px 0; }
.cta-band h2 { margin-bottom: 0.6rem; }

/* prose pages (seo pages, docs, legal) */
.prose { max-width: 760px; margin: 0 auto; padding: 56px 20px 72px; }
.prose h1 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
.prose h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose p, .prose li { color: var(--text); font-size: 1.04rem; }
.prose .lead { color: var(--muted-2); font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: 0.3rem 0; }
.prose a { color: #7a9cff; }
.prose .note { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; color: var(--muted-2); }
.prose-wide { max-width: var(--max); }
.updated { color: var(--muted); font-size: 0.9rem; }

/* docs */
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; max-width: var(--max); margin: 0 auto; padding: 48px 20px 72px; }
.docs-nav { position: sticky; top: 80px; align-self: start; }
.docs-nav a { display: block; color: var(--muted-2); text-decoration: none; padding: 0.35rem 0; font-size: 0.95rem; }
.docs-nav a[aria-current], .docs-nav a:hover { color: var(--text-strong); }
.docs-body h1 { font-size: 2.1rem; }
.docs-body h2 { margin-top: 2rem; font-size: 1.4rem; }
.docs-body p, .docs-body li { font-size: 1.02rem; }
.docs-body a { color: #7a9cff; }
@media (max-width: 860px) { .docs-layout { grid-template-columns: 1fr; gap: 1.5rem; } .docs-nav { position: static; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; } }

/* public tools */
.tool-page { max-width: 960px; margin: 0 auto; padding: 48px 20px 72px; }
.tool-page h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 1.5rem; }
.tool-form label { display: block; font-weight: 600; color: var(--text-strong); margin: 0.9rem 0 0.3rem; font-size: 0.95rem; }
.tool-form input, .tool-form select { width: 100%; background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text-strong); border-radius: 6px; padding: 0.6rem 0.75rem; font-size: 1rem; }
.tool-form input:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.tool-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.tool-form button { margin-top: 1.1rem; }
.tool-result { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.tool-hero { font-size: 2.4rem; font-weight: 800; color: var(--text-strong); line-height: 1.1; }
.tool-hero-sub { color: var(--muted); margin-bottom: 1rem; }
.tool-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tool-table td, .tool-table th { padding: 0.55rem 0; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.95rem; }
.tool-table td:last-child, .tool-table th:last-child { text-align: right; }
.tool-table small { color: var(--muted); display: block; }
.tool-cta { margin-top: 2.5rem; padding: 1.4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.tool-cta p { margin: 0; color: var(--muted-2); }
.tool-links { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 1.5rem; }
.tool-links a { text-decoration: none; }

/* footer */
.site-foot { border-top: 1px solid var(--border); padding: 48px 0 32px; margin-top: 24px; font-size: 0.93rem; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.foot-col { display: grid; gap: 0.4rem; align-content: start; }
.foot-label { color: var(--text-strong); font-weight: 650; margin-bottom: 0.3rem; }
.foot-col a { color: var(--muted-2); text-decoration: none; }
.foot-col a:hover { color: var(--text-strong); }
.foot-inner { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; justify-content: space-between; color: var(--muted); }
.foot-inner a { color: var(--muted-2); text-decoration: none; }
.foot-note { font-size: 0.85rem; }
