:root {
  --bg: #f6f8fb; --bg2: #ffffff; --card: #ffffff; --line: #e3e8f0;
  --text: #1b2432; --muted: #5f6b7d; --accent: #e0245e; --accent2: #0a8f5c; --accent2-bg: #e6f7ef; --gold: #d99a00; --primary: #1f5eff;
  --radius: 14px; --shadow: 0 2px 10px rgba(27, 36, 50, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 17px; direction: rtl; }
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { font-weight: 700; font-size: 24px; display: flex; gap: 8px; align-items: center; text-decoration: none; color: var(--primary); }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
nav { display: flex; align-items: center; gap: 18px; }
nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
nav a.btn { color: #fff; }
.btn { display: inline-block; background: var(--primary); color: #fff; border: 0; padding: 12px 22px; border-radius: 10px; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; font-family: inherit; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--accent); border: 1px solid var(--accent); padding: 6px 12px; font-size: 14px; }
.btn.big { padding: 16px 30px; font-size: 18px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.hero { padding: 50px 0 30px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 46px; line-height: 1.15; margin: 0 0 16px; font-weight: 700; }
.hero h1 span { color: var(--accent); }
.hero p.lead { font-size: 19px; color: var(--muted); line-height: 1.6; margin: 0 0 26px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 12px; font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; color: var(--muted); font-weight: 600; }
input, select { background: #fff; border: 1px solid #c9d2e0; color: var(--text); padding: 12px 14px; border-radius: 10px; font-size: 17px; width: 100%; direction: ltr; text-align: left; font-family: inherit; }
input:focus { outline: 2px solid var(--primary); border-color: transparent; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 120px; margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.err { color: var(--accent); font-size: 14px; min-height: 18px; }
.ok { color: var(--accent2); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 40px 0; }
.steps .card b { display: block; font-size: 32px; color: var(--primary); margin-bottom: 8px; }
.steps .card p { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 14px 10px; text-align: center; cursor: pointer; font-weight: 700; transition: .15s; }
.tile:hover { border-color: #b7c3d6; }
.tile.active { border-color: var(--accent2); background: var(--accent2-bg); }
.tile .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { direction: ltr; text-align: left; font-variant-numeric: tabular-nums; }
.up { color: var(--accent2); } .down { color: var(--accent); }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .v { font-size: 30px; font-weight: 700; }
.stat .k { font-size: 13px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; background: #fff; border: 1px solid var(--line); }
.pill.warn { border-color: var(--gold); color: #8a6100; background: #fff8e6; }
.section { margin: 28px 0; }
.section h2 { font-size: 24px; margin: 0 0 14px; }
.symbol-hero { text-align: center; padding: 30px 0 10px; }
.symbol-hero .sym { font-size: 58px; font-weight: 700; letter-spacing: 2px; direction: ltr; }
.symbol-hero .price { font-size: 36px; font-weight: 700; direction: ltr; }
.symbol-hero .chg { font-size: 20px; font-weight: 700; direction: ltr; }
.ticker-copy { display: inline-flex; gap: 8px; align-items: center; background: var(--bg); border: 1px dashed #b7c3d6; padding: 10px 16px; border-radius: 10px; direction: ltr; font-size: 22px; font-weight: 700; cursor: pointer; }
footer { color: var(--muted); font-size: 13px; text-align: center; padding: 40px 0 30px; line-height: 1.7; }
.hidden { display: none !important; }
.toast { position: fixed; bottom: 20px; inset-inline-start: 50%; transform: translateX(50%); background: #fff; border: 1px solid var(--accent2); color: var(--accent2); padding: 12px 20px; border-radius: 10px; font-weight: 700; box-shadow: var(--shadow); }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; }
  .hero h1 { font-size: 34px; }
  .steps { grid-template-columns: 1fr; }
}

/* ---- ticker tape (panel) ---- */
.tape { direction: ltr; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 18px; box-shadow: var(--shadow); }
.tape-track { display: inline-flex; gap: 28px; padding: 10px 0; white-space: nowrap; animation: tape-scroll 60s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tick { display: inline-flex; gap: 6px; align-items: baseline; text-decoration: none; color: var(--text); font-variant-numeric: tabular-nums; cursor: pointer; padding: 0 4px; }
.tick b { font-weight: 700; }
.tick .sym { font-weight: 700; color: var(--primary); }
.tick.big-drop { background: #fdecef; border-radius: 6px; }
@keyframes tape-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tape-track { animation: none; flex-wrap: wrap; white-space: normal; padding: 10px; } }

/* ---- clock bar (one line above the ticker tape) ---- */
.clockbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 16px; margin: 0 0 10px; box-shadow: var(--shadow); }
.cb-clocks { display: flex; gap: 24px; }
.cb-item { display: inline-flex; align-items: baseline; gap: 8px; }
.cb-label { font-size: 14px; color: var(--muted); font-weight: 600; }
.cb-time { font-size: 26px; font-weight: 700; direction: ltr; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.cb-market { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.cb-countdown { font-size: 15px; font-weight: 600; }
.cb-hours { font-size: 13px; color: var(--muted); }
.mkt { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: 15px; }
.mkt .led { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.mkt.regular { background: var(--accent2-bg); color: var(--accent2); }
.mkt.regular .led { animation: led 1.6s ease-in-out infinite; }
.mkt.pre, .mkt.post { background: #fff8e6; color: #8a6100; }
.mkt.closed { background: #eef2f8; color: var(--muted); }
@keyframes led { 50% { opacity: .35; } }
@media (max-width: 700px) {
  .clockbar { justify-content: center; }
  .cb-time { font-size: 22px; }
}

/* ---- stock picker (combobox) ---- */
.field.symbol-field { flex: 2; min-width: 240px; }
.combo { position: relative; }
.combo input { direction: rtl; text-align: right; }
.combo-list { position: absolute; top: calc(100% + 4px); inset-inline: 0; z-index: 30; max-height: 340px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(27, 36, 50, .14); list-style: none; margin: 0; padding: 6px; }
.combo-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.combo-list li.active, .combo-list li:hover { background: #eef2f8; }
.combo-list li .nm { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-list li .nm small { color: var(--muted); font-size: 13px; }
.combo-list li .sym { direction: ltr; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.combo-list li.empty, .combo-list li.head { color: var(--muted); cursor: default; font-size: 13px; }
.combo-list li.head:hover, .combo-list li.empty:hover { background: none; }
.picked { font-size: 13px; color: var(--accent2); min-height: 18px; margin-top: 8px; }

/* ---- partner link banner (landing, ?ref=CODE) + footer link to /partners ---- */
.refbar { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; justify-content: space-between; margin-top: 18px; padding: 12px 16px; border-radius: 12px; background: var(--accent2-bg); border: 1px solid #9fdfc2; color: var(--text); }
.refbar b { color: var(--accent2); }
.refprices { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 16px; }
.refprices s { color: var(--muted); }
.refprices b { font-size: 18px; color: var(--text); }
.partners-link { display: inline-block; margin-top: 8px; color: var(--primary); font-weight: 700; text-decoration: none; }
.partners-link:hover { text-decoration: underline; }
