/* Sprint 53 (owner 11.11): the guest's landing at the site root (landing.js, landing_parts.js).
   The look is the approved design and does not follow the user's theme: the landing's box
   carries data-theme="swiss" data-mode="light", so the Swiss light tokens of style.css apply
   inside it (text, cards, lines, the accent, the soft backgrounds); the colours the themes
   have no token for — the dark header and footer, the warning's brown, the loss red — are
   named once below. The typeface is the page's own Inter (style.css); nothing comes from
   outside. While the landing stands, <html> has the class «landing-on»: the application's
   header and view are hidden and the page takes the whole window. */
html.landing-on body { max-width: none; padding: 0; background: #15171c; }
@media (prefers-color-scheme: dark) { html.landing-on body { background: #0a0b0d; } }
html.landing-on body > header, html.landing-on #view { display: none; }
@media (prefers-reduced-motion: no-preference) { html.landing-on { scroll-behavior: smooth; } }

.landing {
  --ld-dark: #15171c; --ld-dark-line: #2c2e34; --ld-on-dark: #f2f3f5; --ld-on-dark-soft: #c3c7ce;
  --ld-on-dark-hint: #a8aeb8; --ld-nav: #d5d8de; --ld-step: #a8aeb8;
  --ld-warn-text: #6b3f00; --ld-loss: #9c1017; --ld-avg: var(--warn);
  --ld-btn: #d3d6dc; --ld-btn-hover: #e8eaee;  /* 2.1.125: the dark mode's --primary of style.css */
  /* 14.11 (аудит): 16 px, как приложение и справка; цифры — одной ширины, как везде (2.1.107:
     tabular-nums — его здесь не было) */
  font: 16px/1.5 var(--font); color: var(--text); background: var(--bg); font-variant-numeric: tabular-nums;
}
/* owner 14.11: in the system's dark mode the page is dark too (landing.js sets data-mode="dark" on the
   box; the tokens of style.css's Swiss dark apply); the bands that were dark stay darker than the page */
.landing[data-mode="dark"] {
  --ld-dark: #0a0b0d; --ld-dark-line: #26282e; --ld-warn-text: #f2b85b; --ld-loss: #ff7a7f;
}
/* the page's own elements, set with no weight (:where), so that every class below wins */
:where(.landing) a { color: inherit; }
:where(.landing) a:hover { color: var(--primary-text); }
:where(.landing) p { margin: 0; }
:where(.landing) h1 { margin: 0; font-size: clamp(36px, 5vw, 56px); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; max-width: 880px; white-space: normal; }
:where(.landing) h1::before { content: none; }
:where(.landing) h2 { margin: 0; font-size: clamp(32px, 5vw, 40px); line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; text-transform: none; color: inherit; }
:where(.landing) h3 { margin: 0; font-size: 18px; line-height: 24px; }
/* 2.1.107 (audit, third pass): the focus ring of the application and the help — 2 px of --focus, 2 px off */
.landing :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--logo-radius); }
.landing section:focus { outline: none; }  /* an anchor's target: the focus moves, no frame */
.ld-dark { background: var(--ld-dark); color: var(--ld-on-dark); }
.landing .ld-dark :focus-visible { outline-color: var(--ld-on-dark); }
:where(.ld-dark) a:hover { color: var(--ld-on-dark); }  /* no weight: a button keeps its own colours */
.ld-wrap { max-width: 1120px; margin: 0 auto; padding-inline: 32px; }

/* the header: the application's own <header> rules (a sticky floating bar) do not apply */
/* 2.1.104 (owner 14.11): the dark first screen fills the window under the bar (56 px), its words
   in the middle; when they need more (a phone, a low window) it is as tall as they are */
.ld-top { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 56px); min-height: calc(100svh - 56px); position: static; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.ld-top > .ld-wrap { width: 100%; }  /* a flex item with auto margins would shrink to its words */
/* 13.11 (owner): the bar stays at the top while the page scrolls; the anchors never wrap under
   the name — they scroll sideways when the window is narrow; on a phone they are in the menu */
.ld-sticky { position: sticky; top: 0; z-index: 20; background: var(--ld-dark); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08); }
/* 2.1.125: 4 px above and below the 48 px buttons — the bar stays 56 px (owner 14.11) */
.ld-bar { display: flex; flex-wrap: nowrap; align-items: center; gap: 16px 24px; padding-block: 4px; min-height: 56px; box-sizing: border-box; min-width: 0; }
.ld-brand { font-weight: 700; }
a.ld-brand { color: inherit; text-decoration: none; }  /* 2.1.112: a link to the main page, as it looked */
.ld-brand span { font-weight: 500; color: var(--ld-on-dark-hint); }
.ld-bar .ld-brand { font-size: 18px; line-height: 24px; white-space: nowrap; }
.ld-bar .ld-brand::before { content: ""; display: inline-block; width: 16px; height: 16px; border-radius: var(--logo-radius); background: var(--accent); margin-right: 10px; vertical-align: -1px; }
.ld-nav { display: flex; flex-wrap: nowrap; gap: 0 16px; font-size: 14px; line-height: 20px; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.ld-nav::-webkit-scrollbar { display: none; }
/* 14.11 (owner): the menu of a phone (landing.js bar()); on a wide window it takes no box of its own, its
   anchors stand in the bar as before, the burger and the menu's language button are not there */
.ld-menu { display: contents; }
.ld-lang-menu, .ld-burger { display: none; }
.ld-burger { position: relative; width: 48px; height: 48px; padding: 0;  /* 2.1.125: as «Войти» beside it */ border: 1px solid var(--ld-dark-line); border-radius: var(--radius); background: none; color: var(--ld-on-dark); }
.ld-burger span, .ld-burger span::before, .ld-burger span::after { position: absolute; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.ld-burger span { left: 14px; top: 22px; }
.ld-burger span::before, .ld-burger span::after { content: ""; left: 0; }
.ld-burger span::before { top: -6px; }
.ld-burger span::after { top: 6px; }
.ld-bar.open .ld-burger span { background: transparent; }
.ld-bar.open .ld-burger span::before { top: 0; transform: rotate(45deg); }
.ld-bar.open .ld-burger span::after { top: 0; transform: rotate(-45deg); }
.ld-nav a { color: var(--ld-nav); text-decoration: none; padding: 12px 0; }
.ld-tools { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.ld-lang { border: 0; background: none; color: var(--ld-nav); font-size: 14px; line-height: 20px; font-weight: 600; min-height: 44px; padding: 0 4px; }
.ld-lang:hover { color: var(--ld-on-dark); }
/* 2.1.125 (audit, fourth pass, 1.2): 48 px as every main button, and the dark mode's main-button
   grey #d3d6dc (owner 14.11: the sign-in is graphite/grey like the application's), not white */
.ld-enter { display: inline-flex; align-items: center; box-sizing: border-box; min-height: 48px; background: var(--ld-btn); color: var(--ld-dark); text-decoration: none; font-weight: 600; font-size: 14px; line-height: 20px; padding: 0 16px; border-radius: var(--radius); }
.ld-enter:hover { background: var(--ld-btn-hover); color: var(--ld-dark); }

/* the hero */
.ld-hero { padding-block: 72px 88px; }
.ld-hero-lead { margin-top: 28px; font-size: 22px; line-height: 32px; color: var(--ld-on-dark-soft); max-width: 760px; }
.ld-actions { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
/* 48 px high, as the application's main button and Telegram's button under it (2.1.99, audit:
   was 58) — whatever the text's size */
.ld-hero-note { margin-top: 20px; font-size: 14px; line-height: 20px; color: var(--ld-on-dark-hint); max-width: 620px; }
.ld-facts { margin: 64px 0 0; display: flex; flex-wrap: wrap; gap: 24px 64px; font-size: 14px; line-height: 20px; }
.ld-facts dt { color: var(--ld-on-dark-hint); }
.ld-facts dd { margin: 4px 0 0; }

/* the sections */
.ld-section { padding-top: 88px; }
.ld-lead { margin-top: 16px; color: var(--hint); font-size: 18px; line-height: 28px; max-width: 760px; }
.ld-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.ld-card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--card-shadow); min-width: 0; }
.ld-card h3 + p { margin-top: 8px; color: var(--hint); }
.ld-card .ld-tag + p { margin-top: 14px; color: var(--hint); }
.ld-way { padding: 28px; }
.ld-way h3 { margin-top: 16px; font-size: 22px; line-height: 28px; }
.ld-way h3 + p { margin-top: 12px; }
.ld-tag { display: inline-block; background: var(--surface); font-weight: 600; font-size: 14px; line-height: 20px; padding: 4px 12px; border-radius: var(--r-s); }
.ld-tag.ok { background: var(--ok-soft); color: var(--ok); }
.ld-tag.warn { background: var(--warn-soft); color: var(--ld-warn-text); }
.ld-tag.danger { background: var(--danger-soft); color: var(--ld-loss); }
.ld-note { margin-top: 20px; background: var(--surface); border-radius: var(--radius); padding: 18px 24px; }
.ld-note.warn { background: var(--warn-soft); color: var(--ld-warn-text); }
.ld-note p + p { margin-top: 10px; }
.ld-after { margin-top: 20px; color: var(--hint); }
/* sprint 63: the trading school — the lessons of the help, by group */
/* 2.1.125 (design audit, fourth pass, В3): a group of lessons is one card, the whole card a link
   (a target of 44 px and more); the lessons' names are its text, the count its last line */
a.ld-school-card { display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; }
a.ld-school-card:hover { box-shadow: 0 0 0 1px var(--text), var(--card-shadow); color: inherit; }
a.ld-school-card h3 { font-size: 18px; line-height: 24px; }
a.ld-school-card p { color: var(--hint); font-size: 14px; line-height: 20px; flex: 1 1 auto; }
.ld-school-count { font-size: 14px; line-height: 20px; font-weight: 600; }
.ld-after a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ld-after a:hover { color: var(--primary-text); text-decoration-thickness: 2px; }
.ld-num { font-size: 32px; font-weight: 700; color: var(--hint); line-height: 32px; }
.ld-num + h3 { margin-top: 12px; }
.ld-ord { font-weight: 700; color: var(--hint); }
.ld-ord + h3 { margin-top: 8px; }
.ld-big { font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.01em; }
.ld-big.ok { color: var(--ok); }
.ld-big.loss { color: var(--ld-loss); }
.ld-caption { margin-top: 4px; color: var(--hint); }

/* 14.11 (owner): «Как это выглядит» — three screens of the application on a practice account (the help's
   pictures); a long picture is cut to its top, the whole is in the help */
/* 17.11 (owner: «колонки и скриншоты разного размера»): the three cards are one height; the
   title, the text and the picture of each stand on the same rows (a subgrid — a two-line text
   no longer pushes its picture lower than its neighbour's); every picture window has the same
   proportion — the chart's own — and a long screen is cut at its top part with a soft fade */
.ld-shots { align-items: stretch; }
.ld-shot { display: flex; flex-direction: column; }
@supports (grid-template-rows: subgrid) {
  .ld-shot { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
}
.ld-shot h3 { font-size: 18px; line-height: 24px; }
.ld-shot h3 + p { margin-top: 4px; color: var(--hint); }
.ld-shot-pic { position: relative; margin-top: 14px; aspect-ratio: 780 / 892; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.ld-shot-pic img { display: block; width: 100%; height: auto; }
/* the chart's picture starts with a thin strip of the card above it — moved out of the window */
.ld-shot-pic.whole img { margin-top: -1.6%; }
.ld-shot-pic:not(.whole)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(to bottom, transparent, var(--surface)); pointer-events: none; }

/* one cycle: the chart beside its three figures */
.ld-cycle { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 32px 48px; align-items: center; }
.ld-cycle + .ld-note { margin-top: 28px; }
.ld-chart svg { display: block; width: 100%; height: auto; }
.ld-c-grid { stroke: var(--line); stroke-width: 1; }
.ld-c-text { fill: var(--hint); font-size: 16px; }
.ld-c-price { fill: none; stroke: var(--hint); stroke-width: 2.5; stroke-linejoin: round; }
.ld-c-level { stroke: var(--ld-avg); stroke-width: 2; stroke-dasharray: 6 5; }
.ld-c-tp { fill: none; stroke: var(--ok); stroke-width: 3; stroke-linejoin: round; }
.ld-c-entry { fill: var(--text); stroke: var(--card); stroke-width: 2; }
.ld-c-buy { fill: var(--ld-avg); stroke: var(--card); stroke-width: 2; }
.ld-c-exit { fill: var(--ok); stroke: var(--card); stroke-width: 2; }
.ld-legend { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; line-height: 20px; color: var(--hint); }
.ld-legend span { display: inline-flex; align-items: center; gap: 8px; }
.ld-legend span::before { content: ""; width: 24px; border-top: 3px solid var(--hint); }
.ld-legend .avg::before { border-top: 3px dashed var(--ld-avg); }
.ld-legend .tp::before { border-top-color: var(--ok); }
.ld-figures { display: flex; flex-direction: column; gap: 28px; }

/* the tables: wider than a phone, they scroll inside their card */
.ld-scroll { margin-top: 32px; overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--card-shadow); }
.ld-grid + .ld-scroll { margin-top: 20px; }
.ld-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 16px; }
.ld-table th, .ld-table td { padding: 12px 20px; text-align: left; font-weight: 400; }
.ld-table thead th { font-weight: 600; background: var(--surface); }
.ld-table tbody tr, .ld-table tfoot tr { border-top: 1px solid var(--line); }

/* try it: the three steps and the sign-in */
.ld-final { margin-top: 88px; }
.ld-final .ld-wrap { padding-block: 80px; }
.ld-final h2 { font-size: clamp(32px, 6vw, 56px); line-height: 1.1; letter-spacing: -0.02em; }
.ld-steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 28px; max-width: 760px; }
.ld-steps li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; }
.ld-step { font-size: 32px; font-weight: 700; color: var(--ld-step); line-height: 32px; }
.ld-step-title { font-size: 22px; line-height: 28px; font-weight: 600; }
.ld-step-title + p { margin-top: 4px; color: var(--ld-on-dark-soft); }
.ld-final .ld-actions { margin-top: 44px; }
/* Telegram's button is an iframe its script adds; until it is there the box takes no room */
.ld-widget:not(:has(iframe)) { display: none; }
/* owner 14.11: Telegram's button (40 px, one size only) stands as high as the page's own — 48 px
   since 2.1.99 (audit; was 58 at 1.45): zoom changes the layout box too; 238 × 1.2 = 286 px fits a
   360 px phone, so one size everywhere */
.ld-widget iframe { display: block; zoom: 1.2; }
/* 2.1.112 (owner 15.11: the block's «Войти» did not work — Telegram takes no press on its frame
   made invisible under the page's grey label): the block's «Войти» is the bar's button, grey, 48 px
   (landing.js enter); Telegram's frame is kept for its script, unseen; without the bot's number
   (no .ld-direct) the frame is the button — as Telegram draws it */
.ld-enter-final { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 48px; min-width: 200px; padding: 0 32px; background: var(--ld-btn); color: var(--ld-dark); text-decoration: none; font-weight: 600; font-size: 16px; line-height: 20px; border-radius: var(--radius); }
.ld-enter-final:hover { background: var(--ld-btn-hover); color: var(--ld-dark); }
.ld-actions:not(.ld-direct) .ld-enter-final { display: none; }
.ld-actions.ld-direct .ld-widget { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ld-error { margin-top: 32px; max-width: 760px; background: var(--danger-soft); color: var(--ld-loss); border-radius: var(--radius); padding: 14px 20px; }
.ld-error + .ld-actions { margin-top: 20px; }
.ld-down { margin-top: 16px; font-size: 14px; line-height: 20px; color: var(--ld-on-dark-soft); }

.ld-foot { border-top: 1px solid var(--ld-dark-line); color: var(--ld-on-dark-hint); }
.ld-foot .ld-wrap { padding-block: 28px 40px; display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: 14px; line-height: 20px; }
.ld-foot .ld-brand { color: var(--ld-on-dark); font-weight: 600; }
/* owner 14.11: the price, said quietly at the bottom — a line of its own */
.ld-foot .ld-price { flex-basis: 100%; }
/* owner 14.11 12:30: a bullet before it; 2.1.125 (audit, fourth pass): in the hint's grey, not a red
   of its own — red is the loss's, the danger's and the logo's */
.ld-foot .ld-price::before { content: "●"; color: var(--ld-on-dark-hint); margin-right: 8px; }
.ld-foot .ld-brand span { font-weight: 600; color: inherit; }
/* owner 16.11: the development history, the foot's last line */
.ld-foot .ld-history { color: var(--ld-on-dark-soft); text-decoration: underline; text-underline-offset: 3px; }
/* 16.11 (owner, the review «глазами пользователя»): the terms of use and the contact — links in the
   foot's grey, as the history is; the contact in the hero — a link in the note's own colour */
.ld-foot .ld-foot-links { flex-basis: 100%; color: var(--ld-on-dark-soft); }
.ld-foot .ld-foot-links a { color: var(--ld-on-dark-soft); text-decoration: underline; text-underline-offset: 3px; }

/* a phone: the name, «Войти» and the menu's button in one row; the anchors and the language open under
   them (14.11, owner); less air */
@media (max-width: 720px) {
  .ld-wrap { padding-inline: 20px; }
  .ld-bar { flex-wrap: wrap; gap: 4px 12px; padding-block: 4px; }
  .ld-tools { margin-left: auto; gap: 10px; }
  .ld-lang-bar { display: none; }
  .ld-burger { display: block; }
  .ld-menu { display: none; order: 3; flex-basis: 100%; flex-direction: column; margin-top: 6px; border-top: 1px solid var(--ld-dark-line); max-height: calc(100vh - 80px); overflow-y: auto; }
  .ld-bar.open .ld-menu { display: flex; }
  .ld-nav { margin-left: 0; flex-direction: column; gap: 0; overflow: visible; white-space: normal; font-size: 16px; line-height: 24px; }
  .ld-nav a { padding: 12px 0; border-bottom: 1px solid var(--ld-dark-line); }
  .ld-lang-menu { display: block; align-self: flex-start; min-height: 48px; padding: 0; font-size: 16px; line-height: 24px; }
  /* 2.1.125 (audit, fourth pass, В1; owner 16.11): the first screen is as tall as its words — not the
     window's height with ≈ 350 px of nothing under the facts */
  .ld-top { min-height: 0; }
  .ld-hero { padding-block: 40px 56px; }
  .ld-hero-lead { font-size: 18px; line-height: 28px; }
  .ld-facts { margin-top: 44px; gap: 20px 40px; }
  .ld-section { padding-top: 56px; }
  .ld-final { margin-top: 56px; }
  .ld-final .ld-wrap { padding-block: 56px; }
  .ld-c-text { font-size: 24px; }  /* the chart is drawn small: its words stay readable */
}
@media (max-width: 400px) {
  .ld-bar .ld-brand { font-size: 16px; }  /* the name, «Войти» and the burger stay in one row on 360 px */
  .ld-bar .ld-brand::before { margin-right: 8px; }
  .ld-enter { padding-inline: 12px; }
}
