/* Panel only (views/panel.html). The landing and symbol pages still use style.css alone. */
:root {
  --bg: #f3f5f9; --surface: #ffffff; --raised: #fafbfd; --sunken: #eceff5; --line: #dfe4ec; --line-strong: #c7cfdb;
  --text: #141b26; --text-2: #4d596b; --text-3: #5d6879;
  --primary: #1f5eff; --primary-ink: #1848c4; --primary-wash: #eaf0ff;
  --down: #c01446; --down-wash: #fdecf1; --up: #06734a; --up-wash: #e4f5ec;
  --warn: #7a5600; --warn-wash: #fff5dc; --brand-dot: #e0245e;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --r-lg: 16px; --r-md: 10px; --r-sm: 6px;
  --shadow: 0 1px 2px rgba(20, 27, 38, .05), 0 4px 16px rgba(20, 27, 38, .05);
  --font: "IBM Plex Sans Hebrew", "IBM Plex Sans", system-ui, "Segoe UI", Arial, sans-serif;
  --num: "IBM Plex Sans", "IBM Plex Sans Hebrew", system-ui, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; direction: rtl; }
::selection { background: var(--primary); color: #fff; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--r-sm); }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
.hidden { display: none !important; }
.n { font-family: var(--num); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.down { color: var(--down); } .up { color: var(--up); } .flat { color: var(--text-3); }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 14px; height: 14px; }
.wrapw { max-width: 1180px; margin: 0 auto; padding-inline: 16px; }

/* ---- header: brand, market status, clocks, tape ---- */
.top { background: rgba(243, 245, 249, .92); border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .top { position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(1.4) blur(10px); } }
.top-in { display: flex; align-items: center; gap: 12px; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--num); font-weight: 700; font-size: 19px; color: var(--primary); text-decoration: none; letter-spacing: -.01em; }
.brand i { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-dot); }
.who { margin-inline-start: auto; color: var(--text-3); font-size: 13px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); border: 0; background: none; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { background: var(--sunken); color: var(--text); }
.icon-btn.del:hover { background: var(--down-wash); color: var(--down); }

.market { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding-bottom: 8px; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.regular { background: var(--up-wash); color: var(--up); }
.status.regular::before { box-shadow: 0 0 0 3px rgba(6, 115, 74, .18); }
.status.pre, .status.post { background: var(--warn-wash); color: var(--warn); }
.status.closed { background: var(--sunken); color: var(--text-2); }
.countdown { font-size: 14px; color: var(--text-2); }
.hours { font-size: 13px; color: var(--text-3); }
@media (max-width: 719px) { .hours { display: none; } }
.clocks { margin-inline-start: auto; display: flex; gap: 14px; font-size: 13px; color: var(--text-3); }
.clocks > span { display: inline-flex; align-items: baseline; gap: 6px; }
.clocks b { font-size: 15px; color: var(--text); font-weight: 600; }

.tape { direction: ltr; overflow: hidden; border-top: 1px solid var(--line); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.tape-track { display: inline-flex; gap: 4px; padding-block: 4px; white-space: nowrap; animation: tape-scroll 60s linear infinite; }
.tape:hover .tape-track, .tape:focus-within .tape-track { animation-play-state: paused; }
.tk { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; cursor: pointer; font-size: 14px; color: var(--text-2); }
.tk:hover { background: var(--surface); }
.tk b { font-weight: 700; color: var(--text); }
.tk.big-drop { background: var(--down-wash); }
@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; } }

.banner { margin: 12px 0 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--warn-wash); color: var(--warn); font-size: 14px; }

/* ---- layout ---- */
main { display: grid; gap: 16px; padding-block: 16px 32px; }
.col { display: grid; gap: 16px; min-width: 0; align-content: start; }
@media (min-width: 980px) { main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .side { position: sticky; top: 132px; } }
h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.panel-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 14px 16px 10px; }
.panel-h .meta { color: var(--text-3); font-size: 13px; }
.empty { padding: 18px 16px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid transparent; background: var(--primary); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; transition: background-color .15s ease-out; }
.btn:hover { background: var(--primary-ink); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--sunken); }

/* ---- watches ---- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 10px; padding: 10px 8px 12px 16px; border-top: 1px solid var(--line); align-items: center; }
.w-id { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.w-id a { font-family: var(--num); font-weight: 700; font-size: 17px; text-decoration: none; }
.w-id a:hover { color: var(--primary); }
.w-id .nm { color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-px { display: flex; align-items: baseline; gap: 8px; }
.w-px .price { font-weight: 600; font-size: 17px; padding: 1px 4px; margin: -1px -4px; border-radius: var(--r-sm); }
.chg { font-size: 13px; font-weight: 600; padding: 2px 7px; border-radius: var(--r-sm); }
.chg.down { background: var(--down-wash); } .chg.up { background: var(--up-wash); } .chg.flat { background: var(--sunken); }
.w-rule { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding-inline-end: 8px; font-size: 13px; color: var(--text-2); }
.meter { flex: 1; min-width: 40px; height: 4px; border-radius: 2px; background: var(--sunken); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--text-3); transform-origin: right center; transition: transform .5s var(--ease-out), background-color .2s ease; }
.meter.hot i { background: var(--down); }
.w-rule .left { color: var(--text-3); white-space: nowrap; }
.w-rule .left.hot { color: var(--down); font-weight: 600; }
.fired { display: inline-flex; align-items: center; gap: 4px; color: var(--down); font-weight: 600; white-space: nowrap; }
.wait { color: var(--warn); }

/* ---- add form ---- */
.add { border-top: 1px solid var(--line); padding: 14px 16px 16px; background: var(--raised); border-radius: 0 0 var(--r-lg) var(--r-lg); display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.add .f-sym, .add .msgs { grid-column: 1 / -1; }
@media (min-width: 720px) { .add { grid-template-columns: 2fr auto 1fr auto; align-items: end; } .add .f-sym { grid-column: auto; } }
.fld { display: grid; gap: 5px; min-width: 0; }
.fld > label, .fld > .lbl { font-size: 13px; color: var(--text-2); font-weight: 500; }
.inp { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--text-3); }
.inp:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-wash); }
.inp input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 0; font-size: 16px; color: var(--text); }
.inp input::placeholder { color: var(--text-3); }
.inp input[type=number] { direction: ltr; text-align: left; font-family: var(--num); font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; background: var(--sunken); border-radius: var(--r-md); padding: 3px; min-height: 44px; }
.seg label { display: grid; place-items: center; padding: 0 12px; border-radius: 7px; color: var(--text-2); font-size: 14px; cursor: pointer; white-space: nowrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(20, 27, 38, .1); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 1px; }
.add .btn { grid-column: 1 / -1; min-height: 44px; }
@media (min-width: 720px) { .add .btn { grid-column: auto; } }
.msgs { font-size: 13px; }
.msgs .picked { color: var(--up); }
.msgs .err { color: var(--down); font-weight: 600; }
.msgs .hint { color: var(--text-3); }
.msgs > :empty { display: none; }

/* stock picker */
.combo { position: relative; }
.combo-list { position: absolute; top: calc(100% + 4px); inset-inline: 0; z-index: 30; max-height: 340px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 10px 30px rgba(20, 27, 38, .14); list-style: none; margin: 0; padding: 6px; }
.combo-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: var(--r-sm); cursor: pointer; }
.combo-list li.active, .combo-list li:hover { background: var(--sunken); }
.combo-list li .nm { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-list li .nm small { color: var(--text-3); font-size: 13px; }
.combo-list li .sym { font-family: var(--num); direction: ltr; font-weight: 700; color: var(--primary); }
.combo-list li.empty, .combo-list li.head { color: var(--text-3); cursor: default; font-size: 13px; min-height: 0; }
.combo-list li.head:hover, .combo-list li.empty:hover { background: none; }

/* ---- alerts ---- */
.alert { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.a-badge { grid-row: span 2; width: 60px; min-height: 52px; border-radius: var(--r-md); background: var(--down-wash); color: var(--down); display: grid; place-content: center; text-align: center; font-weight: 700; font-size: 14px; line-height: 1.15; }
.a-badge small { font-size: 10px; font-weight: 500; color: var(--text-2); }
.a-top { display: flex; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; }
.a-top a { font-family: var(--num); font-weight: 700; font-size: 16px; text-decoration: none; }
.a-top a:hover { color: var(--primary); }
.a-top .when { color: var(--text-3); font-size: 13px; }
.clicked { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--up); font-weight: 600; }
.clicked.no { color: var(--text-3); font-weight: 500; }
.after { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--sunken); border-radius: var(--r-sm); }
.after div { padding: 5px 8px; display: grid; }
.after div + div { border-inline-start: 1px solid var(--line); }
.after small { font-size: 11px; color: var(--text-3); }
.after .n { font-size: 13px; font-weight: 600; text-align: right; }
.after .pend { color: var(--text-3); font-weight: 400; font-size: 12px; }
/* grouped: newest alert is the card, the day's earlier ones fold under it */
.a-group { border-top: 1px solid var(--line); }
.a-group .alert { border-top: 0; }
.a-more { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 36px; padding: 0 16px 8px; font-size: 13px; text-align: start; border-radius: 0; }
.a-more .cnt { display: inline-grid; place-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--down-wash); color: var(--down); font-weight: 700; font-size: 12px; }
.a-more .i { margin-inline-start: auto; transition: transform .15s; }
.a-group.open .a-more .i { transform: rotate(180deg); }
.a-rest { background: var(--sunken); border-top: 1px solid var(--line); }
.a-rest .alert.sub { padding-block: 8px; border-top: 1px solid var(--line); }
.a-rest .alert.sub:first-child { border-top: 0; }
.a-rest .alert.sub .a-badge { min-height: 44px; width: 54px; font-size: 13px; background: var(--card, #fff); }

/* ---- stats ---- */
.lead { display: grid; grid-template-columns: 1fr 1fr; padding: 4px 16px 14px; gap: 12px; }
.lead div { display: grid; }
.lead .n { font-size: 30px; font-weight: 700; letter-spacing: -.02em; text-align: right; line-height: 1.15; }
.lead small { color: var(--text-2); font-size: 13px; }
dl.kv { margin: 0; border-top: 1px solid var(--line); }
dl.kv div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 16px; font-size: 14px; }
dl.kv div + div { border-top: 1px solid var(--line); }
dl.kv dt { color: var(--text-2); }
dl.kv dd { margin: 0; font-weight: 600; }
dl.kv dd.na { color: var(--text-3); font-weight: 400; font-size: 13px; }
.note { margin: 0; padding: 10px 16px 14px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--line); }

/* ---- settings ---- */
.set { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.set .ico { width: 36px; height: 36px; border-radius: var(--r-md); background: var(--primary-wash); color: var(--primary); display: grid; place-items: center; flex: none; }
.set .t { display: grid; min-width: 0; }
.set .t small { color: var(--text-3); font-size: 13px; }
.set > :last-child { margin-inline-start: auto; }
.linkbtn { background: none; border: 0; color: var(--primary); font-weight: 600; cursor: pointer; min-height: 40px; padding: 0 6px; border-radius: var(--r-sm); }
.linkbtn:hover { background: var(--primary-wash); color: var(--primary-ink); }
.set-out { padding: 0 16px 12px; font-size: 13px; }
.set-out.ok { color: var(--up); } .set-out.err { color: var(--down); } .set-out.info { color: var(--text-2); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 16px 16px; }
.tile { display: grid; gap: 2px; text-align: right; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; }
.tile:hover { background: var(--sunken); }
.tile[aria-pressed=true] { border-color: var(--primary); background: var(--primary-wash); box-shadow: inset 0 0 0 1px var(--primary); }
.tile small { font-weight: 400; font-size: 12px; color: var(--text-3); }

.dev { padding: 0 16px 16px; display: grid; gap: 10px; }
.dev-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dev-row .btn { grid-column: 1 / -1; }
.dev pre { margin: 0; font-size: 12px; color: var(--text-2); direction: ltr; text-align: left; white-space: pre-wrap; }

footer { padding-bottom: 32px; color: var(--text-3); font-size: 12px; }

/* touch: links and inputs fill their row height */
.w-id a, .a-top a { padding-block: 10px; margin-block: -10px; }
.inp { cursor: text; }
.inp input { align-self: stretch; }
@media (max-width: 719px) {
  .w-rule { flex-wrap: wrap; row-gap: 6px; }
  .w-rule .meter { order: 3; flex-basis: 100%; }
  .w-rule .left { white-space: normal; }
}

/* press feedback */
.btn, .icon-btn, .tile, .tk, .linkbtn { transition: transform 140ms var(--ease-out), background-color .15s ease, color .15s ease; }
.btn:active:not(:disabled), .icon-btn:active, .tile:active, .tk:active, .linkbtn:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) {
  .meter i { transition: none; }
  .btn:active, .icon-btn:active, .tile:active, .tk:active, .linkbtn:active { transform: none; }
}

/* header nav: admin pages as compact buttons; the masked phone gives way on small screens */
/* <a> and <button> share one box here, so "תצוגת לקוח" (a button) sits level with the page links. */
.top-in .linkbtn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 40px; min-height: 0; line-height: 1; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-md); padding: 0 10px; color: var(--text); }
.top-in .linkbtn:hover { background: var(--sunken); color: var(--text); }
.top-in .btn { white-space: nowrap; }
@media (max-width: 620px) {
  .top-in { gap: 6px; }
  .who { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}


/* inputs have an intrinsic min width that ignores the grid track; let them shrink */
.inp input { min-width: 0; width: 100%; }
.w-px { min-width: 0; flex-wrap: wrap; justify-content: flex-end; }

/* ==== Pro tier ====
   Same layout, a different key. The header becomes the one dark surface on the page (navy-indigo,
   the trading-terminal register), so the tier is obvious from the first pixel; the accent shifts
   from electric blue to indigo. Upgrade colors, still a trading tool. */
body[data-plan="pro"] {
  --bg: #f2f2fa; --raised: #f9f8fe; --sunken: #ebeaf6; --line: #dedcf0; --line-strong: #c4c1e3;
  --primary: #4f46e5; --primary-ink: #3b32c9; --primary-wash: #ecebff;
  --pro: #4f46e5; --pro-2: #22d3ee; --pro-glow: rgba(79, 70, 229, .22);
  --ink: #12122e; --ink-2: #1c1b4a; --ink-line: rgba(255, 255, 255, .10); --ink-text: #f4f4ff; --ink-text-2: #b9b8dc; --ink-text-3: #8d8bb8;
  --ink-up: #5eead4; --ink-down: #fda4af;
}
body[data-plan="pro"] .top { background: linear-gradient(180deg, var(--ink-2), var(--ink)); border-bottom: 1px solid var(--ink-line); color: var(--ink-text); }
@media (min-width: 720px) { body[data-plan="pro"] .top { backdrop-filter: none; } }
body[data-plan="pro"] .brand { color: #fff; }
body[data-plan="pro"] .brand i { background: var(--pro-2); box-shadow: 0 0 0 3px rgba(34, 211, 238, .18); }
body[data-plan="pro"] .who { color: var(--ink-text-3); }
body[data-plan="pro"] .icon-btn { color: var(--ink-text-2); }
body[data-plan="pro"] .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
body[data-plan="pro"] .top-in .linkbtn { background: rgba(255, 255, 255, .06); border-color: var(--ink-line); color: var(--ink-text); }
body[data-plan="pro"] .top-in .linkbtn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
body[data-plan="pro"] .countdown { color: var(--ink-text-2); }
body[data-plan="pro"] .hours, body[data-plan="pro"] .clocks { color: var(--ink-text-3); }
body[data-plan="pro"] .clocks b { color: var(--ink-text); }
body[data-plan="pro"] .status.closed { background: rgba(255, 255, 255, .08); color: var(--ink-text-2); }
body[data-plan="pro"] .status.regular { background: rgba(94, 234, 212, .14); color: var(--ink-up); }
body[data-plan="pro"] .status.regular::before { box-shadow: 0 0 0 3px rgba(94, 234, 212, .2); }
body[data-plan="pro"] .status.pre, body[data-plan="pro"] .status.post { background: rgba(253, 224, 71, .14); color: #fde68a; }
body[data-plan="pro"] .tape { border-top-color: var(--ink-line); }
body[data-plan="pro"] .tk { color: var(--ink-text-2); }
body[data-plan="pro"] .tk b { color: var(--ink-text); }
body[data-plan="pro"] .tk:hover { background: rgba(255, 255, 255, .08); }
body[data-plan="pro"] .tk .up { color: var(--ink-up); }
body[data-plan="pro"] .tk .down { color: var(--ink-down); }
body[data-plan="pro"] .tk.big-drop { background: rgba(253, 164, 175, .14); }
body[data-plan="pro"] .top ::selection { background: var(--pro-2); color: var(--ink); }
.pro-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: linear-gradient(135deg, var(--pro, #4f46e5), var(--pro-2, #0891b2)); color: #fff; font-family: var(--num); font-size: 11px; font-weight: 700; letter-spacing: .06em; vertical-align: middle; }
.brand .pro-tag { margin-inline-start: 4px; }

/* Admin "customer view" bar */
.viewbar { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin: 12px 0 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--warn-wash); color: var(--warn); font-size: 14px; }
.viewbar select { font: inherit; font-size: 14px; min-height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); }
.viewbar .linkbtn { min-height: 32px; margin-inline-start: auto; color: var(--warn); }

/* ==== Reversal card (Pro) ====
   The mechanism is the emblem: a dark head with the reversal path itself — a decline to a swing low
   and the turn up — and one point of light that travels it (offset-path, 6s, linear: constant motion).
   Reduced motion: the path stays, the point rests at the low. */
.rev { overflow: visible; }
.rev-head { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.rev-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 16px; background: linear-gradient(135deg, var(--ink-2, #1c1b4a), var(--ink, #12122e)); color: var(--ink-text, #f4f4ff); }
.rev-head h2 { display: inline-flex; align-items: center; gap: 8px; color: #fff; }
.rev-head .meta { color: var(--ink-text-3, #8d8bb8); font-size: 13px; }
.rev-head p { grid-column: 1; margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-text-2, #b9b8dc); max-width: 62ch; }
.rev-head p b { color: #fff; font-weight: 600; }
.rev-path { grid-column: 2; grid-row: 1 / span 2; width: 132px; height: 64px; position: relative; }
.rev-path svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rev-path .p-base { fill: none; stroke: rgba(255, 255, 255, .18); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rev-path .p-lit { fill: none; stroke: url(#rev-grad); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rev-path .p-low { fill: var(--pro-2, #22d3ee); }
.rev-path .p-dot { position: absolute; top: 0; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(34, 211, 238, .28), 0 0 14px rgba(34, 211, 238, .8);
  offset-path: path('M4 6 L44 40 L62 52 L84 22 L128 10'); offset-rotate: 0deg; animation: rev-travel 6s linear infinite; }
@keyframes rev-travel { 0% { offset-distance: 0%; opacity: 0; } 6% { opacity: 1; } 94% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rev-path .p-dot { animation: none; offset-distance: 48%; opacity: 1; } }
/* phone: the path keeps its 132×64 box (the light point follows fixed coordinates), sits under the text */
@media (max-width: 719px) { .rev-head { grid-template-columns: 1fr; } .rev-path { grid-column: 1; grid-row: auto; justify-self: start; } }
/* tracking state on a reversal watch row */
.w-rule .track { display: inline-flex; align-items: center; gap: 6px; color: var(--pro, #4f46e5); font-weight: 600; white-space: nowrap; }
.w-rule .track::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--pro-glow, rgba(79, 70, 229, .2)); }
.meter.track i { background: linear-gradient(90deg, var(--pro-2, #0891b2), var(--pro, #4f46e5)); }
/* mini V: where the price stands on the move (decline leg / at the low / rising) */
.vg { width: 34px; height: 18px; flex: none; }
.vg path { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vg circle { fill: var(--pro, #4f46e5); }
.vg.lit path { stroke: var(--pro, #4f46e5); }
.rev .add { grid-template-columns: 1fr 1fr; }
.rev .add .fld > label { white-space: nowrap; }
/* number fields: no spinner (it ate the digits at narrow widths), roomier padding */
.inp input[type=number]::-webkit-outer-spin-button, .inp input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.inp input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.rev .add .inp { padding: 0 10px; }
.rev .add .f-sym { grid-column: 1 / -1; }
@media (min-width: 720px) and (max-width: 1099px) { .rev .add { grid-template-columns: repeat(4, minmax(0, 1fr)); } .rev .add .f-sym { grid-column: 1 / -1; } .rev .add .btn { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .rev .add { grid-template-columns: minmax(180px, 2fr) repeat(4, minmax(104px, 1fr)) auto; } .rev .add .f-sym { grid-column: auto; } }
.rev .add .btn { min-height: 44px; }
.w-rule .params { color: var(--text-3); white-space: nowrap; }
.w-rule .edit { background: none; border: 0; padding: 0 4px; min-height: 28px; color: var(--primary); font-weight: 600; cursor: pointer; border-radius: var(--r-sm); font-size: 13px; }
.w-rule .edit:hover { background: var(--primary-wash); }
.rev .add.editing { box-shadow: inset 0 0 0 2px var(--primary-wash); }
/* locked teaser for non-Pro plans */
.rev-lock { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.rev-lock .btn { margin-inline-start: auto; white-space: nowrap; }

/* paused watch (beyond the plan cap): still listed, clearly not alerting, one step to upgrade */
.watch.paused { background: var(--raised); }
.watch.paused .w-id a, .watch.paused .price, .watch.paused .chg { color: var(--text-3); }
.watch.paused .chg { background: var(--sunken); }
.watch.paused .meter { opacity: .35; }
.w-rule .off { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); font-weight: 600; white-space: nowrap; }
.w-rule .off a { color: var(--primary); font-weight: 600; }

/* several rules per symbol (Pro): the 2nd+ rule of a symbol shows as a rule line under it */
.watch.more { padding-top: 0; border-top: 0; }
.watch.more .w-id, .watch.more .w-px { display: none; }
.watch.more .w-rule { grid-column: 1; }
.w-rule .rule-n { color: var(--text-3); font-size: 12px; white-space: nowrap; }

/* rule lines: the delete button sits on the rule's own row, not on an empty first row */
.watch.more { grid-template-columns: minmax(0, 1fr) auto; }
.watch.more .w-rule { grid-column: 1; grid-row: 1; }
.watch.more .icon-btn.del { grid-column: 2; grid-row: 1; }

/* phone header: brand + logout on the first row, the admin buttons wrap to a second row */
@media (max-width: 620px) {
  .top-in { flex-wrap: wrap; row-gap: 6px; }
  .top-in .brand { order: 0; flex: 1 1 auto; margin-inline-end: 0; overflow: visible; }
  .top-in #logout { order: 1; }
  .top-in .linkbtn { order: 2; flex: 1 1 auto; height: 34px; font-size: 13px; padding: 0 8px; text-align: center; justify-content: center; }
  .top-in .who { display: none; }
  .rev-head { padding: 12px 14px; }
  .rev-head p { font-size: 12.5px; }
  .w-rule .params { white-space: normal; }
}

/* footer: link to the partner program (views/partners.html) */
footer .partners-link { display: inline-block; margin-top: 6px; color: var(--primary-ink); font-weight: 600; text-decoration: none; }
footer .partners-link:hover { text-decoration: underline; }
