/* SkyTrade v2 — public pages (landing, record, methodology). Requires ui/core.css. */

/* ---------- tape (market strip) ---------- */
.tape { border-block-end: 1px solid var(--line); background: var(--bg-inset); }
.tape__in { position: relative; display: flex; align-items: stretch; gap: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tape__in::-webkit-scrollbar { display: none; }
.tape__meta { flex: none; display: flex; align-items: center; gap: 8px; padding-inline-end: 16px; margin-inline-end: 4px; border-inline-end: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-xs); white-space: nowrap; }
.tick {
  flex: none; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 9px 16px; border-inline-end: 1px solid var(--line); text-decoration: none; color: inherit; min-height: 52px;
}
.tick__sym { font-family: var(--font-mono); font-weight: 600; font-size: 0.8125rem; color: var(--ink); direction: ltr; }
.tick__px { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.tick__chg { font-family: var(--font-mono); font-size: 0.75rem; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; text-align: end; }
.tick .spark { grid-row: 1 / span 2; grid-column: 2; }
.tick { grid-template-columns: auto 64px auto; }
.tick__sym, .tick__px { grid-column: 1; }
.tick .spark { grid-column: 2; grid-row: 1 / span 2; width: 64px; height: 24px; }
.tick__chg { grid-column: 3; grid-row: 1 / span 2; }
.tick--off { opacity: 0.55; }
.spark polyline { stroke-width: 1.5; }
.spark--up polyline { stroke: var(--bull); }
.spark--down polyline { stroke: var(--bear); }

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(32px, 4.5vw, 64px) clamp(48px, 6vw, 80px); overflow: hidden; }
.hero::before {
  /* one quiet light source behind the chart; not animated */
  content: ""; position: absolute; inset-block-start: -240px; inset-inline-end: -180px; width: 820px; height: 620px; pointer-events: none;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 72%);
}
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(32px, 4.5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.125rem, 1.25rem + 2.5vw, 3.25rem); line-height: var(--lh-tight); letter-spacing: -0.03em; margin-block-start: var(--s-4); }
[dir="rtl"] .hero h1 { letter-spacing: 0; line-height: 1.4; font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3.1rem); }
.hero__lede { margin-block-start: var(--s-5); color: var(--ink-2); font-size: var(--fs-lede); max-width: 60ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-block-start: var(--s-6); }
.hero__fine { margin-block-start: var(--s-3); color: var(--ink-3); font-size: var(--fs-sm); }
.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-block-start: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--panel); }
.proof > div { padding: 14px 16px; border-inline-start: 1px solid var(--line); display: grid; gap: 2px; min-width: 0; }
.proof > div:first-child { border-inline-start: 0; }
.proof b { font-family: var(--font-mono); font-weight: 600; font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
[dir="rtl"] .proof b { font-family: var(--font-fa); }
.proof span { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.35; }
@media (max-width: 1080px) { .hero__grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); } .proof > div:nth-child(3) { border-inline-start: 0; } .proof > div:nth-child(n+3) { border-block-start: 1px solid var(--line); } }

/* ---------- chart card ---------- */
.chartcard { position: relative; overflow: hidden; }
.chartcard__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 16px 16px 12px; }
.chartcard__quote { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.chartcard__sym { font-family: var(--font-mono); font-weight: 600; font-size: 1rem; direction: ltr; unicode-bidi: isolate; }
.chartcard__sym small { color: var(--ink-3); font-weight: 400; }
.chartcard__px { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; letter-spacing: -0.01em; }
.chartcard__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 0 16px 12px; border-block-end: 1px solid var(--line); }
.chartcard__legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-inline-start: auto; font-size: var(--fs-xs); color: var(--ink-3); }
.chartcard__legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-inline-end: 6px; border-radius: 2px; }
.chartcard__legend .k-e20 { background: var(--accent); }
.chartcard__legend .k-e50 { background: var(--ink-3); }
.chartcard__legend .k-vol { height: 8px; width: 6px; background: var(--line-strong); }
.chartcard__plot { height: clamp(300px, 34vw, 440px); position: relative; direction: ltr; }
.chartcard__plot .status { position: absolute; inset: 0; justify-content: center; }
.chartcard__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 16px; border-block-start: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-3); }
.deskchip { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); text-decoration: none; min-height: 32px; }
.deskchip:hover { color: var(--ink); }
.deskchip svg { width: 14px; height: 14px; }

/* ---------- analysis cards ---------- */
.lenses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.lens { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.lens__viz { height: 158px; background: var(--bg-inset); border-block-end: 1px solid var(--line); position: relative; display: flex; flex-direction: column; }
.lens__viz > svg { flex: 1; min-height: 0; width: 100%; height: 100%; direction: ltr; padding-block-start: 6px; }
.lens__viz .status { position: absolute; inset: 0 0 26px; justify-content: center; font-size: var(--fs-xs); }
.lens__cap { flex: none; height: 26px; display: flex; align-items: center; gap: 7px; padding-inline: 12px; border-block-start: 1px solid var(--line);
  font-size: 0.6875rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lens__cap .live { display: inline-flex; align-items: center; gap: 5px; color: var(--bull); font-weight: 600; flex: none; }
.lens__cap .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lens__cap span:last-child { overflow: hidden; text-overflow: ellipsis; }
.lens__body { padding: 16px 18px 18px; display: grid; gap: 8px; align-content: start; flex: 1; }
.lens__body h3 { font-size: 1.0625rem; }
.lens__body p { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.55; }
[dir="rtl"] .lens__body p { line-height: 1.9; }
.lens__role { font-size: var(--fs-xs); color: var(--ink-3); display: block; }
.lens__role b { color: var(--ink-2); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 2px; }
.chips span { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 6px; direction: ltr; }
@media (max-width: 1080px) { .lenses { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lenses { grid-template-columns: 1fr; } }

/* mini-visual strokes */
.mv { font-family: var(--font-mono); font-size: 9px; }
.mv text { fill: var(--ink-3); }
.mv .t-ink { fill: var(--ink-2); }
.mv .ln { stroke: var(--ink-2); fill: none; stroke-width: 1.5; stroke-linejoin: round; }
.mv .ln-mute { stroke: var(--line-strong); fill: none; stroke-width: 1; }
.mv .ln-dash { stroke: var(--ink-3); fill: none; stroke-width: 1; stroke-dasharray: 3 3; }
.mv .ln-acc { stroke: var(--accent); fill: none; stroke-width: 1.5; }
.mv .ln-up { stroke: var(--bull); fill: none; stroke-width: 1.5; }
.mv .ln-down { stroke: var(--bear); fill: none; stroke-width: 1.5; }
.mv .f-up { fill: var(--bull); }
.mv .f-down { fill: var(--bear); }
.mv .f-upsoft { fill: var(--bull-soft); }
.mv .f-downsoft { fill: var(--bear-soft); }
.mv .f-acc { fill: var(--accent); }
.mv .f-accsoft { fill: var(--accent-soft); }
.mv .f-mute { fill: var(--line-2); }
.mv .f-ink { fill: var(--ink-2); }
.mv .dot { fill: var(--panel); stroke: var(--ink-2); stroke-width: 1.5; }

/* ---------- anatomy ---------- */
.anatomy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.steps { display: grid; gap: 0; counter-reset: step; }
.steps li { position: relative; padding-block: 18px; padding-inline-start: 52px; border-block-start: 1px solid var(--line); counter-increment: step; }
.steps li:first-child { border-block-start: 0; padding-block-start: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; inset-inline-start: 0; inset-block-start: 18px;
  font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 600; color: var(--accent);
  width: 36px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 6px;
}
.steps li:first-child::before { inset-block-start: 0; }
.steps h3 { font-size: 1.0625rem; margin-block-end: 6px; }
.steps p { color: var(--ink-2); font-size: var(--fs-sm); }
.anat__viz { height: 230px; border-block-end: 1px solid var(--line); background: var(--bg-inset); direction: ltr; }
.anat__viz svg { width: 100%; height: 100%; }
.anat .tbl { font-size: var(--fs-sm); }
.anat .tbl td { white-space: normal; }
.anat .tbl th[scope="row"] { color: var(--ink-3); font-weight: 500; width: 36%; }
@media (max-width: 980px) { .anatomy { grid-template-columns: 1fr; } }

/* ---------- today's desk ---------- */
.board .tbl td, .board .tbl th { padding-block: 13px; }
.board__close { display: grid; gap: 2px; }
.board__close small { color: var(--ink-3); font-family: var(--font-mono); font-size: 0.6875rem; direction: ltr; unicode-bidi: isolate; }
.board__state { color: var(--ink-3); font-size: var(--fs-xs); }
.dirs { display: inline-flex; gap: 3px; align-items: center; }
.kind { font-size: var(--fs-xs); color: var(--ink-3); }
.kind--scenario { color: var(--ink); font-weight: 600; }
.levels { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: var(--fs-xs); }
.levels span { display: inline-flex; align-items: center; gap: 5px; }
.levels svg { width: 13px; height: 13px; }
.unlock {
  margin-block-start: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 28px;
  padding: 22px 24px; border-radius: var(--r-3); border: 1px solid var(--line-2);
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
}
.unlock h3 { font-size: 1.25rem; display: flex; align-items: center; gap: 10px; }
.unlock h3 svg { width: 18px; height: 18px; color: var(--accent); }
.unlock p { color: var(--ink-2); margin-block-start: 6px; font-size: var(--fs-sm); max-width: 70ch; }
.unlock__cta { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .unlock { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  /* a phone gets one card per market, with the desk columns in view, instead of a sideways scroll */
  .board .tbl thead { display: none; }
  .board .tbl, .board .tbl tbody { display: block; }
  .board .tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "sym last chg" "h4 d1 lk"; gap: 10px 14px; padding: 14px 16px; border-block-end: 1px solid var(--line); align-items: start; }
  .board .tbl tbody tr:last-child { border-block-end: 0; }
  .board .tbl td { padding: 0; border: 0; white-space: normal; }
  .board .tbl td:nth-child(1) { grid-area: sym; }
  .board .tbl td:nth-child(2) { grid-area: last; }
  .board .tbl td:nth-child(3) { grid-area: chg; min-width: 64px; }
  .board .tbl td:nth-child(4) { display: none; }
  .board .tbl td:nth-child(5) { grid-area: h4; }
  .board .tbl td:nth-child(6) { grid-area: d1; }
  .board .tbl td:nth-child(7) { grid-area: lk; align-self: center; }
  .board .tbl td[colspan] { grid-column: 1 / -1; }
  .board .tbl td[data-label]::before { content: attr(data-label); display: block; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; color: var(--ink-3); margin-block-end: 2px; }
  .board .levels > span { display: none; }
}

/* ---------- record / trust ---------- */
.trust { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; height: 100%; }
.stats > div { padding: 20px; border-block-end: 1px solid var(--line); border-inline-end: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.stats > div:nth-child(3n) { border-inline-end: 0; }
.stats > div:nth-last-child(-n+3) { border-block-end: 0; }
.stats b { font-family: var(--font-mono); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
[dir="rtl"] .stats b { font-family: var(--font-fa); }
.stats span { font-size: var(--fs-xs); color: var(--ink-3); }
.outbar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; gap: 2px; margin-block: 14px 12px; }
.outbar i { display: block; min-width: 3px; }
.o-obj { background: var(--bull); }
.o-inv { background: var(--bear); }
.o-exp { background: var(--ink-3); }
.o-not { background: var(--line-strong); opacity: 0.55; }
.outlegend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font-size: var(--fs-sm); }
.outlegend div { display: flex; align-items: center; gap: 8px; }
.outlegend i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.outlegend b { font-family: var(--font-mono); margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.anchor-line { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-block-start: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-2); }
.anchor-line .seal { margin-block-start: 3px; }
.trust__links { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 18px; border-block-start: 1px solid var(--line); }
@media (max-width: 980px) { .trust { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div { border-inline-end: 1px solid var(--line) !important; border-block-end: 1px solid var(--line) !important; }
  .stats > div:nth-child(2n) { border-inline-end: 0 !important; }
  .stats > div:nth-last-child(-n+2) { border-block-end: 0 !important; }
}

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.plan { padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 18px; }
.plan--main { border-color: var(--line-strong); background: linear-gradient(160deg, var(--panel-2) 0%, var(--panel) 60%); position: relative; }
.plan__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .plan__price { justify-content: flex-end; }
.plan__price b { font-family: var(--font-mono); font-size: clamp(2.75rem, 2.2rem + 2vw, 3.75rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.plan__price .unit { font-weight: 700; font-size: 1.125rem; color: var(--ink); letter-spacing: 0.04em; }
.plan__price .word { font-family: var(--font-sans); letter-spacing: -0.03em; }
[dir="rtl"] .plan__price .word { font-family: var(--font-fa); letter-spacing: 0; }
.plan__price span { color: var(--ink-3); }
.ticks { display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 0.9375rem; }
.ticks svg { width: 16px; height: 16px; flex: none; margin-block-start: 4px; color: var(--accent); }
.plan__fine { color: var(--ink-3); font-size: var(--fs-xs); margin-block-start: auto; }
.plan__cta { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) { .pricing { grid-template-columns: 1fr; } }

/* ---------- record & methodology pages ---------- */
.pagehead { padding-block: clamp(40px, 5vw, 72px) clamp(24px, 3vw, 40px); }
.pagehead h1 { font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.875rem); line-height: 1.12; letter-spacing: -0.025em; margin-block-start: var(--s-3); max-width: 22ch; }
[dir="rtl"] .pagehead h1 { letter-spacing: 0; line-height: 1.45; }
.pagehead p { color: var(--ink-2); font-size: var(--fs-lede); margin-block-start: var(--s-4); max-width: 68ch; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--panel); overflow: hidden; }
.fig { padding: 18px 20px; display: grid; gap: 4px; border-inline-end: 1px solid var(--line); border-block-end: 1px solid var(--line); margin-inline-end: -1px; margin-block-end: -1px; }
.fig .ch { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.fig b { font-family: var(--font-mono); font-size: clamp(1.5rem, 1.25rem + 1vw, 2.125rem); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
[dir="rtl"] .fig b { font-family: var(--font-fa); }
.fig .den { font-size: var(--fs-xs); color: var(--ink-3); }
.four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--panel); overflow: hidden; }
.four > div { padding: 18px 20px; border-inline-end: 1px solid var(--line); display: grid; gap: 4px; }
.four > div:last-child { border-inline-end: 0; }
.four .ch { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.four .ch i { width: 8px; height: 8px; border-radius: 2px; }
.four b { font-family: var(--font-mono); font-size: 1.75rem; font-weight: 600; }
[dir="rtl"] .four b { font-family: var(--font-fa); }
@media (max-width: 640px) { .four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .four > div:nth-child(2) { border-inline-end: 0; } .four > div:nth-child(-n+2) { border-block-end: 1px solid var(--line); } }
.kv { display: grid; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--panel); overflow: hidden; }
.kv > div { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px; padding: 14px 18px; border-block-end: 1px solid var(--line); }
.kv > div:last-child { border-block-end: 0; }
.kv dt { color: var(--ink-3); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.kv dd { color: var(--ink); font-size: var(--fs-sm); overflow-wrap: anywhere; }
@media (max-width: 640px) { .kv > div { grid-template-columns: 1fr; gap: 4px; } }
.tile30 { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--panel); overflow: hidden; }
.tile30 > header { grid-column: 1 / -1; padding: 12px 18px; border-block-end: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.tile30 > div { display: contents; }
.tile30 section { padding: 18px 20px; display: grid; gap: 4px; }
.tile30 section + section { border-inline-start: 1px solid var(--line); }
.tile30 section .ch { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.tile30 section b { font-family: var(--font-mono); font-size: 1.75rem; font-weight: 600; direction: ltr; unicode-bidi: isolate; }
.chainok { display: flex; gap: 10px; align-items: center; }
.subhead { display: flex; align-items: baseline; gap: 12px; margin-block: 40px 14px; }
.subhead h2 { font-size: 1.375rem; }
.subhead span { font-family: var(--font-mono); color: var(--accent); font-size: var(--fs-sm); }

/* Persian chips are words, not code: set in the Persian face, never in mono (Plex Mono has no Arabic). */
[dir="rtl"] .chips span { font-family: var(--font-fa); font-size: 0.75rem; direction: rtl; }
[dir="rtl"] .lens__cap { font-family: var(--font-fa); }
[dir="rtl"] .steps li::before { content: counter(step, persian); font-family: var(--font-fa); }
[dir="rtl"] .board__close small { text-align: end; }
.methodology > * + * { margin-block-start: 14px; }
.methodology h2 { font-size: 1.25rem; margin-block-start: 36px !important; }
.four .ch i { display: inline-block; }
.tbl .seal { display: inline-block; vertical-align: middle; }
[dir="rtl"] .subhead span { font-family: var(--font-fa); }
.pagehead p.small, .pagehead .note { font-size: var(--fs-sm); max-width: 88ch; }
.pagehead .note { font-size: 0.9375rem; }
.served { display: block; margin-block-start: 4px; }
[dir="rtl"] .served[dir="auto"] { text-align: start; }
[dir="rtl"] .kv dd[dir="auto"] { text-align: right; }
