/* Public Tv2Mt page (/tv2mt): TradingView alerts to MetaTrader 4/5.
 *
 * Built on theme-dark.css, auth.css (backdrop, gold button, ghost button,
 * --auth-* tokens), contact.css (contact cards) and the shared part of
 * mql-lock-page.css (sections, cards, plans, table, videos, dialog and the
 * `mql-reveal` scroll reveal). This file gives the page its own identity:
 *
 * 1. A teal / blue accent on the shared components (scoped to .tvm-page).
 * 2. The hero flow: a chart fires an alert, a packet travels through the
 *    webhook to the server and on to the EA, the MetaTrader terminal opens
 *    the trade and the take-profits close it step by step.
 * 3. A numbered timeline for "How it works".
 * 4. The partial take-profit ladder.
 *
 * Motion rules: only transform and opacity are animated; every animated part
 * keeps its space at all times (no layout shift); the loops run only under
 * prefers-reduced-motion: no-preference and pause off screen (tv2mt-page.js).
 * The un-animated styles are the final state of each loop, so reduced motion
 * shows a finished picture. Mobile first; sizes are fluid (clamp).
 *
 * Technique used for the moving dots and markers: the moving element is a
 * full-size layer (`inset: 0`) over its track, so `translateX(100%)` always
 * means "the whole length of the track", whatever the screen width.
 */

.tvm-page {
  --tvm-teal: #2fd6c0;
  --tvm-teal-strong: #5cf0da;
  --tvm-teal-soft: rgba(47, 214, 192, 0.14);
  --tvm-teal-line: rgba(47, 214, 192, 0.45);
  --tvm-teal-glow: rgba(47, 214, 192, 0.35);
  --tvm-blue: #6f9bff;
  --tvm-blue-soft: rgba(111, 155, 255, 0.14);
  --tvm-on-accent: #04110f;
  --tvm-node: 2.5rem;
  --tvm-num: 2.6rem;
  --tvm-loop: 16s;
  --tvm-ladder-loop: 12s;
}

/* ============================================================ Accents */

.tvm-page .mql-eyebrow {
  background-color: var(--tvm-teal-soft);
  color: var(--tvm-teal);
}

.tvm-page .mql-breadcrumb__list a:hover {
  color: var(--tvm-teal);
}

.tvm-page .mql-hero__fact-icon,
.tvm-page .mql-plan__check {
  color: var(--tvm-teal);
}

.tvm-page .mql-card__icon {
  background: linear-gradient(145deg, var(--tvm-teal-strong), var(--tvm-blue));
  color: var(--tvm-on-accent);
  box-shadow: 0 10px 30px -12px var(--tvm-teal-glow);
}

.tvm-page .mql-card::before,
.tvm-page .mql-plan::before {
  background: radial-gradient(circle at 0% 0%, rgba(47, 214, 192, 0.12), transparent 60%);
}

.tvm-page .mql-plan--highlight {
  border-color: var(--tvm-teal-line);
  background:
    radial-gradient(circle at 100% 0%, rgba(47, 214, 192, 0.16), transparent 55%),
    var(--mql-surface-raised);
  box-shadow: 0 24px 60px -30px var(--tvm-teal-glow);
}

.tvm-page .mql-plan__badge {
  background: linear-gradient(135deg, var(--tvm-teal-strong), var(--tvm-blue));
  color: var(--tvm-on-accent);
}

.tvm-page .mql-plan__amount--ask {
  color: var(--tvm-teal);
}

.tvm-page .mql-compare__table .mql-compare__ours {
  background-color: rgba(47, 214, 192, 0.06);
}

.tvm-page .mql-compare__table thead .mql-compare__ours {
  color: var(--tvm-teal);
}

.tvm-page .tvm-video__poster {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(circle at 30% 20%, rgba(47, 214, 192, 0.22), transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(111, 155, 255, 0.22), transparent 55%),
    var(--mql-surface);
}

.tvm-page .mql-video__link {
  color: var(--tvm-teal);
}

.tvm-page .tvm-cta {
  border-color: var(--tvm-teal-line);
  background:
    radial-gradient(circle at 0% 0%, rgba(47, 214, 192, 0.16), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(111, 155, 255, 0.16), transparent 50%),
    var(--mql-surface-raised);
}

/* ================================================================ Hero */

/* Teal light in place of the gold one; it drifts with auth.css's keyframes
   (and stops under reduced motion, like every .auth-aurora). */
.tvm-aurora--teal {
  top: -38%;
  left: -16%;
  background: radial-gradient(circle, rgba(47, 214, 192, 0.22), transparent 62%);
  animation: auth-drift-a 22s ease-in-out infinite alternate;
}

@media (min-width: 1024px) {
  .tvm-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.tvm-hero__title {
  max-width: 22ch;
}

/* ----------------------------------------------------- Hero flow (mock) */

.tvm-flow {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  font-size: var(--font-size-xs);
}

.tvm-chart,
.tvm-term {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius-sm);
  background-color: var(--mql-surface);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.95);
}

.tvm-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--auth-line);
  color: var(--auth-subtle);
  font-weight: var(--font-weight-semibold);
}

.tvm-window-bar__title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tvm-dots {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.3rem;
}

.tvm-dots span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background-color: var(--auth-line-strong);
}

.tvm-chip {
  flex: 0 0 auto;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-pill);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.04em;
}

.tvm-chip--blue {
  background-color: var(--tvm-blue-soft);
  color: var(--tvm-blue);
}

.tvm-chip--buy {
  background-color: rgba(94, 224, 160, 0.14);
  color: var(--auth-success);
}

/* Chart */

.tvm-chart__body {
  position: relative;
  padding: 0.75rem 0.75rem 0.5rem;
}

.tvm-chart__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.tvm-chart__level {
  stroke: var(--tvm-blue);
  stroke-width: 1.25;
  stroke-dasharray: 5 5;
  opacity: 0.7;
}

.tvm-chart__wicks line {
  stroke: var(--auth-line-strong);
  stroke-width: 1.5;
}

.tvm-chart__bodies rect {
  fill: var(--auth-success);
  rx: 2;
}

.tvm-chart__bodies rect.is-down {
  fill: var(--auth-error);
}

/* The ring that pulses on the last candle when the alert fires. */
.tvm-chart__ping {
  fill: none;
  stroke: var(--tvm-blue);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}

.tvm-chart__alert {
  position: absolute;
  top: 0.6rem;
  left: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(111, 155, 255, 0.45);
  border-radius: var(--radius-pill);
  background-color: rgba(12, 18, 36, 0.94);
  color: var(--tvm-blue);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
}

.tvm-chart__alert svg {
  width: 0.9rem;
  height: 0.9rem;
}

/* Pipe: webhook -> server -> EA */

.tvm-pipe {
  display: grid;
  grid-template-columns: auto minmax(1.5rem, 1fr) auto minmax(1.5rem, 1fr) auto;
  align-items: start;
  gap: 0.35rem;
  padding-inline: 0.25rem;
}

.tvm-node {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  min-width: 0;
  max-width: 7.5rem;
  color: var(--auth-muted);
  font-weight: var(--font-weight-semibold);
  text-align: center;
}

.tvm-node__icon {
  width: var(--tvm-node);
  height: var(--tvm-node);
  padding: 0.6rem;
  border: 1px solid var(--tvm-teal-line);
  border-radius: 50%;
  background-color: var(--mql-surface-raised);
  color: var(--tvm-teal);
}

/* A glow ring that lights up while the alert passes this node. */
.tvm-node::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--tvm-node);
  height: var(--tvm-node);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--tvm-teal-soft), 0 0 24px 4px var(--tvm-teal-glow);
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
}

.tvm-node__label {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tvm-track {
  position: relative;
  height: 2px;
  margin-top: calc(var(--tvm-node) / 2 - 1px);
  background-image: linear-gradient(90deg, var(--tvm-teal-line) 50%, transparent 0);
  background-size: 8px 2px;
}

.tvm-packet {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.tvm-packet__dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background-color: var(--tvm-teal-strong);
  box-shadow: 0 0 12px 2px var(--tvm-teal-glow);
  transform: translate(-50%, -50%);
}

/* Terminal */

.tvm-term__body {
  display: grid;
  padding: 0.75rem;
}

/* The idle line and the trade sit in the same cell. */
.tvm-term__idle,
.tvm-term__trade {
  grid-area: 1 / 1;
}

.tvm-term__idle {
  align-self: center;
  justify-self: center;
  color: var(--auth-subtle);
  opacity: 0;
}

.tvm-term__trade {
  display: grid;
  gap: 0.6rem;
}

.tvm-term__row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--auth-line);
  border-radius: 10px;
  background-color: var(--mql-surface-raised);
  font-family: var(--font-mono);
}

.tvm-term__row .tvm-chip {
  font-family: var(--font-sans);
}

.tvm-term__lot {
  color: var(--auth-text);
  font-weight: var(--font-weight-bold);
}

.tvm-term__status {
  display: grid;
  margin-inline-start: auto;
  font-family: var(--font-sans);
  font-weight: var(--font-weight-semibold);
}

.tvm-term__state {
  grid-area: 1 / 1;
  justify-self: end;
}

.tvm-term__state--open {
  color: var(--auth-success);
  opacity: 0;
}

.tvm-term__state--closed {
  color: var(--auth-subtle);
}

/* Position bar: four parts; each turns grey when its take-profit closes it. */
.tvm-position {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}

.tvm-position__seg {
  position: relative;
  height: 0.55rem;
  overflow: hidden;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--tvm-teal), var(--tvm-blue));
}

.tvm-position__closed {
  position: absolute;
  inset: 0;
  background-color: #2a2c38;
}

.tvm-term__tps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tvm-term__tp {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 1.8rem;
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  color: var(--auth-muted);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

.tvm-term__tp-hit {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-color: var(--tvm-teal-soft);
  box-shadow: inset 0 0 0 1px var(--tvm-teal-line);
}

.tvm-term__tp-label {
  position: relative;
}

/* Always takes its line, so showing it moves nothing. */
.tvm-term__toast {
  justify-self: start;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--tvm-teal-line);
  border-radius: var(--radius-pill);
  background-color: rgba(6, 30, 27, 0.92);
  color: var(--tvm-teal);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
  opacity: 0;
}

/* Step captions share one reserved line (two on narrow screens). */
.tvm-captions {
  position: relative;
  min-height: 2.6em;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
  text-align: center;
}

.tvm-caption {
  position: absolute;
  inset: 0;
  opacity: 0;
}

/* Final state without motion: the last caption is shown. */
.tvm-caption--4 {
  opacity: 1;
}

/* ------------------------------------------------------ Hero flow motion */

@media (prefers-reduced-motion: no-preference) {
  .tvm-chart__alert { animation: tvm-alert var(--tvm-loop) var(--auth-ease) infinite; }
  .tvm-chart__ping { animation: tvm-ping var(--tvm-loop) ease-out infinite; }
  .tvm-node--1::before { animation: tvm-node-1 var(--tvm-loop) linear infinite; }
  .tvm-node--2::before { animation: tvm-node-2 var(--tvm-loop) linear infinite; }
  .tvm-node--3::before { animation: tvm-node-3 var(--tvm-loop) linear infinite; }
  .tvm-packet--1 { animation: tvm-packet-1 var(--tvm-loop) linear infinite; }
  .tvm-packet--2 { animation: tvm-packet-2 var(--tvm-loop) linear infinite; }
  .tvm-term__idle { animation: tvm-idle var(--tvm-loop) linear infinite; }
  .tvm-term__trade { animation: tvm-trade var(--tvm-loop) var(--auth-ease) infinite; }
  .tvm-term__state--open { animation: tvm-open var(--tvm-loop) linear infinite; }
  .tvm-term__state--closed { animation: tvm-closed var(--tvm-loop) linear infinite; }
  .tvm-term__toast { animation: tvm-toast var(--tvm-loop) var(--auth-ease) infinite; }
  .tvm-hit-1 { animation: tvm-hit-1 var(--tvm-loop) linear infinite; }
  .tvm-hit-2 { animation: tvm-hit-2 var(--tvm-loop) linear infinite; }
  .tvm-hit-3 { animation: tvm-hit-3 var(--tvm-loop) linear infinite; }
  .tvm-hit-4 { animation: tvm-hit-4 var(--tvm-loop) linear infinite; }
  .tvm-caption--1 { animation: tvm-caption-1 var(--tvm-loop) linear infinite; }
  .tvm-caption--2 { animation: tvm-caption-2 var(--tvm-loop) linear infinite; }
  .tvm-caption--3 { animation: tvm-caption-3 var(--tvm-loop) linear infinite; }
  .tvm-caption--4 { animation: tvm-caption-4 var(--tvm-loop) linear infinite; }

  /* tv2mt-page.js marks a loop that is off screen; it then stands still. */
  [data-loop].is-offscreen,
  [data-loop].is-offscreen *,
  [data-loop].is-offscreen *::before {
    animation-play-state: paused;
  }
}

/* One 16-second cycle. 0-10%: the alert fires. 14-30%: webhook to server.
   30-46%: server to EA. 46-50%: the trade opens. 58/67/75/83%: TP 1, 2, 3
   and the final TP close it. 92-100%: everything fades for the next loop. */

@keyframes tvm-alert {
  0%, 5% { opacity: 0; transform: translateY(6px) scale(0.92); }
  10%, 92% { opacity: 1; transform: none; }
  97%, 100% { opacity: 0; transform: none; }
}

@keyframes tvm-ping {
  0%, 6% { opacity: 0; transform: scale(0.4); }
  8% { opacity: 1; transform: scale(0.6); }
  20%, 100% { opacity: 0; transform: scale(2.6); }
}

@keyframes tvm-node-1 {
  0%, 12% { opacity: 0; }
  15%, 19% { opacity: 1; }
  23%, 100% { opacity: 0; }
}

@keyframes tvm-node-2 {
  0%, 28% { opacity: 0; }
  31%, 35% { opacity: 1; }
  39%, 100% { opacity: 0; }
}

@keyframes tvm-node-3 {
  0%, 44% { opacity: 0; }
  47%, 51% { opacity: 1; }
  55%, 100% { opacity: 0; }
}

@keyframes tvm-packet-1 {
  0%, 14% { opacity: 0; transform: translateX(0); }
  16% { opacity: 1; transform: translateX(0); }
  28% { opacity: 1; transform: translateX(100%); }
  30%, 100% { opacity: 0; transform: translateX(100%); }
}

@keyframes tvm-packet-2 {
  0%, 31% { opacity: 0; transform: translateX(0); }
  33% { opacity: 1; transform: translateX(0); }
  44% { opacity: 1; transform: translateX(100%); }
  46%, 100% { opacity: 0; transform: translateX(100%); }
}

@keyframes tvm-idle {
  0%, 44% { opacity: 1; }
  47%, 95% { opacity: 0; }
  99%, 100% { opacity: 1; }
}

@keyframes tvm-trade {
  0%, 46% { opacity: 0; transform: translateY(8px); }
  50%, 92% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: none; }
}

@keyframes tvm-open {
  0%, 83% { opacity: 1; }
  85%, 100% { opacity: 0; }
}

@keyframes tvm-closed {
  0%, 83% { opacity: 0; }
  85%, 100% { opacity: 1; }
}

@keyframes tvm-toast {
  0%, 58% { opacity: 0; transform: translateY(4px); }
  61%, 71% { opacity: 1; transform: none; }
  74%, 100% { opacity: 0; transform: none; }
}

@keyframes tvm-hit-1 {
  0%, 58% { opacity: 0; }
  60%, 100% { opacity: 1; }
}

@keyframes tvm-hit-2 {
  0%, 67% { opacity: 0; }
  69%, 100% { opacity: 1; }
}

@keyframes tvm-hit-3 {
  0%, 75% { opacity: 0; }
  77%, 100% { opacity: 1; }
}

@keyframes tvm-hit-4 {
  0%, 83% { opacity: 0; }
  85%, 100% { opacity: 1; }
}

@keyframes tvm-caption-1 {
  0%, 2% { opacity: 0; }
  4%, 22% { opacity: 1; }
  25%, 100% { opacity: 0; }
}

@keyframes tvm-caption-2 {
  0%, 23% { opacity: 0; }
  26%, 43% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

@keyframes tvm-caption-3 {
  0%, 45% { opacity: 0; }
  48%, 55% { opacity: 1; }
  58%, 100% { opacity: 0; }
}

@keyframes tvm-caption-4 {
  0%, 57% { opacity: 0; }
  60%, 93% { opacity: 1; }
  97%, 100% { opacity: 0; }
}

/* ============================================================ Timeline */

.tvm-steps {
  display: grid;
  gap: clamp(0.85rem, 0.7rem + 0.6vw, 1.25rem);
  max-width: 54rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.tvm-step {
  position: relative;
  display: grid;
  grid-template-columns: var(--tvm-num) minmax(0, 1fr);
  align-items: start;
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.5rem);
}

/* The line that joins one number to the next. */
.tvm-step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: var(--tvm-num);
  bottom: calc(-1 * clamp(0.85rem, 0.7rem + 0.6vw, 1.25rem));
  left: calc(var(--tvm-num) / 2 - 1px);
  width: 2px;
  background: linear-gradient(var(--tvm-teal-line), rgba(111, 155, 255, 0.25));
}

.tvm-step__number {
  display: inline-grid;
  place-items: center;
  width: var(--tvm-num);
  height: var(--tvm-num);
  border: 1px solid var(--tvm-teal-line);
  border-radius: 50%;
  background-color: var(--mql-surface);
  color: var(--tvm-teal);
  font-family: var(--font-brand);
  font-weight: var(--font-weight-brand);
}

.tvm-step__body {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  padding: var(--mql-card-pad);
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius);
  background-color: var(--mql-surface);
}

.tvm-step__title {
  font-family: var(--font-brand);
  font-size: var(--mql-fs-h3);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.tvm-step__text {
  color: var(--auth-muted);
  line-height: 1.6;
}

/* ============================================================ Features */

/* Eleven cards: rows of two or three, the last row centred instead of
   leaving an empty slot (flex instead of the shared grid). */
@media (min-width: 640px) {
  .tvm-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .tvm-features > .mql-card {
    flex: 0 1 calc((100% - clamp(0.85rem, 0.7rem + 0.6vw, 1.4rem)) / 2);
  }
}

@media (min-width: 1024px) {
  .tvm-features > .mql-card {
    flex-basis: calc((100% - 2 * clamp(0.85rem, 0.7rem + 0.6vw, 1.4rem)) / 3);
  }
}

/* ===================================================== Settings table */

.tvm-settings {
  max-width: 60rem;
  margin-inline: auto;
}

@media (min-width: 720px) {
  .tvm-settings__table tbody th {
    width: 32%;
  }
}

/* Phones: the shared table turns into cards; this table needs no cell label. */
@media (max-width: 719.98px) {
  .tvm-settings__table td::before {
    content: none;
  }

  .tvm-settings__table tbody th {
    color: var(--tvm-teal);
  }
}

/* ================================================= Partial take profit */

.tvm-ptp {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.25rem, 1rem + 2vw, 3rem);
}

@media (min-width: 960px) {
  .tvm-ptp {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}

.tvm-ptp__copy {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.tvm-ptp__list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--auth-muted);
  line-height: 1.55;
}

.tvm-ptp__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.tvm-ptp__list strong {
  color: var(--auth-text);
}

.tvm-ptp__check {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  color: var(--tvm-teal);
}

.tvm-ptp__example {
  display: grid;
  gap: 0.4rem;
  padding: var(--mql-card-pad);
  border: 1px solid var(--tvm-teal-line);
  border-radius: var(--auth-radius);
  background:
    radial-gradient(circle at 0% 0%, rgba(47, 214, 192, 0.12), transparent 60%),
    var(--mql-surface);
}

.tvm-ptp__example-title {
  color: var(--tvm-teal);
  font-family: var(--font-brand);
  font-size: var(--mql-fs-h3);
  font-weight: var(--font-weight-bold);
}

.tvm-ptp__example-text {
  color: var(--auth-text);
  line-height: 1.6;
}

/* Ladder (decorative) */

.tvm-ladder {
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding: clamp(1rem, 0.8rem + 1vw, 1.75rem) clamp(1.25rem, 1rem + 1vw, 2rem);
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius);
  background-color: var(--mql-surface);
  font-size: var(--font-size-xs);
}

.tvm-ladder__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
}

.tvm-ladder__head .tvm-chip {
  font-family: var(--font-sans);
}

.tvm-ladder__lot {
  color: var(--auth-text);
  font-weight: var(--font-weight-bold);
}

/* Reserved height: rail, dots, labels and the TP 1 note. */
.tvm-ladder__track {
  position: relative;
  height: 4.75rem;
  margin-inline: 0.5rem;
}

.tvm-ladder__rail,
.tvm-ladder__fill {
  position: absolute;
  top: 0.75rem;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  transform: translateY(-50%);
}

.tvm-ladder__rail {
  background-color: var(--auth-line-strong);
}

/* Final state: the whole way travelled. */
.tvm-ladder__fill {
  background: linear-gradient(90deg, var(--tvm-teal), var(--tvm-blue));
  transform-origin: left center;
  transform: translateY(-50%) scaleX(1);
}

.tvm-ladder__stop {
  position: absolute;
  top: 0;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  transform: translateX(-50%);
  color: var(--auth-muted);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
}

.tvm-ladder__stop--0 { left: 0; justify-items: start; transform: translateX(-0.5rem); }
.tvm-ladder__stop--1 { left: 25%; }
.tvm-ladder__stop--2 { left: 50%; }
.tvm-ladder__stop--3 { left: 75%; }
/* The last stop's box ends at the track end, so its label never sticks out. */
.tvm-ladder__stop--4 { left: 100%; justify-items: end; transform: translateX(calc(-100% + 0.5rem)); }

.tvm-ladder__dot {
  position: relative;
  width: 1rem;
  height: 1rem;
  margin-top: 0.25rem;
  border: 2px solid var(--auth-line-strong);
  border-radius: 50%;
  background-color: var(--mql-surface-raised);
}

.tvm-ladder__dot-hit {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background-color: var(--tvm-teal);
  box-shadow: 0 0 12px 2px var(--tvm-teal-glow);
}

.tvm-ladder__note {
  color: var(--tvm-teal);
  font-weight: var(--font-weight-bold);
}

/* The moving price marker: a full-width layer, moved by translateX(0-100%). */
.tvm-ladder__marker-layer {
  position: absolute;
  inset: 0;
  transform: translateX(100%);
  pointer-events: none;
}

.tvm-ladder__marker {
  position: absolute;
  top: 0.75rem;
  left: 0;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 0 0 4px var(--tvm-teal-soft), 0 0 16px 4px var(--tvm-teal-glow);
  transform: translate(-50%, -50%);
}

.tvm-position--ladder .tvm-position__seg {
  display: grid;
  place-items: center;
  height: 1.75rem;
  border-radius: 6px;
}

.tvm-position__text {
  position: relative;
  color: var(--auth-text);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .tvm-ladder__marker-layer { animation: tvm-ladder-marker var(--tvm-ladder-loop) var(--auth-ease) infinite; }
  .tvm-ladder__fill { animation: tvm-ladder-fill var(--tvm-ladder-loop) var(--auth-ease) infinite; }
  .tvm-ptp-hit-1 { animation: tvm-ptp-hit-1 var(--tvm-ladder-loop) linear infinite; }
  .tvm-ptp-hit-2 { animation: tvm-ptp-hit-2 var(--tvm-ladder-loop) linear infinite; }
  .tvm-ptp-hit-3 { animation: tvm-ptp-hit-3 var(--tvm-ladder-loop) linear infinite; }
  .tvm-ptp-hit-4 { animation: tvm-ptp-hit-4 var(--tvm-ladder-loop) linear infinite; }
}

/* One 12-second cycle: price moves from the entry to each take-profit in
   turn (20%, 42%, 62%, 82%), waits there, then the picture resets. */

@keyframes tvm-ladder-marker {
  0% { opacity: 0; transform: translateX(0); }
  4%, 8% { opacity: 1; transform: translateX(0); }
  20%, 30% { opacity: 1; transform: translateX(25%); }
  42%, 50% { opacity: 1; transform: translateX(50%); }
  62%, 70% { opacity: 1; transform: translateX(75%); }
  82%, 92% { opacity: 1; transform: translateX(100%); }
  97%, 100% { opacity: 0; transform: translateX(100%); }
}

@keyframes tvm-ladder-fill {
  0% { opacity: 0; transform: translateY(-50%) scaleX(0); }
  4%, 8% { opacity: 1; transform: translateY(-50%) scaleX(0); }
  20%, 30% { opacity: 1; transform: translateY(-50%) scaleX(0.25); }
  42%, 50% { opacity: 1; transform: translateY(-50%) scaleX(0.5); }
  62%, 70% { opacity: 1; transform: translateY(-50%) scaleX(0.75); }
  82%, 92% { opacity: 1; transform: translateY(-50%) scaleX(1); }
  97%, 100% { opacity: 0; transform: translateY(-50%) scaleX(1); }
}

@keyframes tvm-ptp-hit-1 {
  0%, 19% { opacity: 0; }
  21%, 92% { opacity: 1; }
  97%, 100% { opacity: 0; }
}

@keyframes tvm-ptp-hit-2 {
  0%, 41% { opacity: 0; }
  43%, 92% { opacity: 1; }
  97%, 100% { opacity: 0; }
}

@keyframes tvm-ptp-hit-3 {
  0%, 61% { opacity: 0; }
  63%, 92% { opacity: 1; }
  97%, 100% { opacity: 0; }
}

@keyframes tvm-ptp-hit-4 {
  0%, 81% { opacity: 0; }
  83%, 92% { opacity: 1; }
  97%, 100% { opacity: 0; }
}

/* ============================================================ Risk note */

.tvm-risk {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  max-width: 48rem;
  margin: clamp(1.25rem, 1rem + 1vw, 2rem) auto 0;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius-sm);
  background-color: var(--mql-surface);
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
  line-height: 1.55;
}

.tvm-risk__icon {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.1rem;
  color: var(--color-warning);
}

/* ============================================================ Final CTA */

.tvm-cta__related {
  color: var(--auth-subtle);
  font-size: var(--auth-fs-small);
}

.tvm-cta__related a {
  color: var(--tvm-teal);
  font-weight: var(--font-weight-semibold);
}

/* ========================================================= Wide screens */

@media (min-width: 1280px) {
  .tvm-flow {
    font-size: var(--font-size-sm);
  }

  .tvm-page {
    --tvm-node: 2.85rem;
  }
}

/* Wide monitors: a wider page column with larger type, as on /mqllock. */
@media (min-width: 1680px) {
  .tvm-page {
    --mql-max: clamp(84rem, 40rem + 36vw, 104rem);
    --mql-fs-h2: clamp(2.75rem, 1.6rem + 1.1vw, 3.4rem);
    --mql-fs-h3: clamp(1.25rem, 0.95rem + 0.3vw, 1.45rem);
    --mql-fs-lead: clamp(1.2rem, 0.95rem + 0.25vw, 1.4rem);
  }

  .tvm-page .mql-hero__title {
    font-size: clamp(3.75rem, 1.5rem + 2.2vw, 4.75rem);
  }

  .tvm-page .mql-hero__lead {
    max-width: 46rem;
  }

  .tvm-page .mql-hero__facts,
  .tvm-page .mql-plan__features,
  .tvm-page .mql-video__meta,
  .tvm-page .tvm-ptp__list {
    font-size: var(--font-size-md);
  }

  .tvm-page .mql-card__text,
  .tvm-page .tvm-step__text,
  .tvm-page .mql-faq__answer,
  .tvm-page .mql-compare__table th,
  .tvm-page .mql-compare__table td {
    font-size: 1.0625rem;
  }

  .tvm-flow {
    max-width: 42rem;
    font-size: var(--font-size-base);
  }

  .tvm-ladder {
    font-size: var(--font-size-sm);
  }
}
