/* הקו המדלג — עיצוב (מבוסס על השפה של "התחנה הבאה", גוון ענבר) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-anchor: none; }
body {
  font-family: "Assistant", "Heebo", system-ui, sans-serif;
  background: #f8fafc; color: #0f172a; line-height: 1.55;
}
.boot { padding: 48px 16px; text-align: center; color: #64748b; font-size: 18px; }
.wrap { max-width: 860px; margin: 0 auto; padding: 20px 14px 60px; }

header h1 {
  font-family: "Heebo", sans-serif; font-weight: 900; font-size: 30px; margin: 6px 0 4px;
}
.beta {
  font-size: 13px; font-weight: 700; color: #b45309; background: #fef3c7;
  border: 1px solid #fcd34d; border-radius: 999px; padding: 2px 10px; vertical-align: middle;
}
.tag { margin: 2px 0 10px; color: #475569; font-size: 16px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.stat {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 4px 10px; font-size: 14px; color: #334155;
}
.stat b { color: #b45309; }
.mut { color: #64748b; }

.explain {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px;
  padding: 12px 14px; font-size: 14.5px; color: #52525b; margin-bottom: 14px;
}

.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chipf {
  border: 1px solid #e2e8f0; background: #fff; border-radius: 999px;
  padding: 6px 14px; font-size: 14.5px; cursor: pointer; font-family: inherit; color: #334155;
}
.chipf.on { background: #d97706; border-color: #d97706; color: #fff; font-weight: 700; }
.city-sel {
  border: 1px solid #e2e8f0; background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 14.5px; font-family: inherit; color: #334155; cursor: pointer;
  max-width: 230px;
}
.city-sel:focus { outline: 2px solid #f59e0b; border-color: transparent; }
.chipf.sys { border-style: dashed; color: #64748b; font-size: 13px; }
.chipf.sys.on { background: #475569; border-color: #475569; color: #fff; }
.search {
  flex: 1; min-width: 220px; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 9px 12px; font-size: 15px; font-family: inherit; background: #fff;
}
.search:focus { outline: 2px solid #f59e0b; border-color: transparent; }
.count { font-size: 13px; color: #64748b; min-height: 18px; margin-bottom: 4px; }
.controls2 { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 8px; }
.fsel {
  border: 1px solid #e2e8f0; background: #fff; border-radius: 8px;
  padding: 6px 10px; font-size: 13.5px; font-family: inherit; color: #475569; cursor: pointer;
  max-width: 210px;
}
.fsel:focus { outline: 2px solid #f59e0b; border-color: transparent; }
.fnum {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #e2e8f0; background: #fff; border-radius: 8px;
  padding: 5px 10px; font-size: 13.5px; color: #475569;
}
.fnum input {
  width: 64px; border: 1px solid #e2e8f0; border-radius: 6px; padding: 3px 6px;
  font-family: inherit; font-size: 13.5px; text-align: center;
}
.fnum input:focus { outline: 2px solid #f59e0b; border-color: transparent; }

.list { overflow-anchor: none; }
.it {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; margin-bottom: 8px;
  overflow: hidden;
}
.it.open { border-color: #f59e0b; box-shadow: 0 1px 8px rgba(217, 119, 6, .12); }
.grp-list { padding: 0 12px 10px; }
.it.inner { margin-bottom: 6px; border-color: #f1f5f9; background: #f8fafc; }
.it.inner.open { border-color: #f59e0b; background: #fff; }
.it.inner .it-head { padding: 9px 12px; }
.it.inner .it-title { font-size: 14.5px; }
.it-head {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: right;
  background: none; border: 0; padding: 12px 14px; cursor: pointer; font-family: inherit;
  user-select: text;
}
.line-badge {
  flex: 0 0 auto; min-width: 46px; text-align: center; background: #b45309; color: #fff;
  font-family: "Heebo", sans-serif; font-weight: 800; font-size: 17px;
  border-radius: 9px; padding: 6px 8px;
}
.it-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.it-title { font-weight: 700; font-size: 15.5px; color: #0f172a; }
.it-title .code { font-weight: 400; color: #64748b; font-size: 13px; }
.it-sub { font-size: 13.5px; color: #64748b; }
.arrow { color: #cbd5e1; font-size: 12px; flex: 0 0 auto; }

.detail { padding: 0 14px 14px; user-select: text; }
.map-wrap { position: relative; }
.map { height: 300px; border-radius: 10px; border: 1px solid #e2e8f0; }
.full-btn {
  position: absolute; bottom: 10px; right: 10px; z-index: 800;
  background: #fff; border: 1px solid #cbd5e1; border-radius: 8px;
  padding: 5px 12px; font-family: inherit; font-size: 13px; font-weight: 700;
  color: #b45309; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.full-btn:hover { border-color: #f59e0b; }
.legend {
  display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: #64748b; margin: 8px 2px;
}
.legend .dot {
  display: inline-block; width: 11px; height: 11px; border-radius: 50%;
  background: #fff; border: 3px solid; vertical-align: -1px; margin-left: 5px;
}
.legend .dot.red { border-color: #dc2626; }
.legend .dot.green { border-color: #16a34a; }
.legend .dot.small { border-color: #b45309; background: #fde68a; width: 8px; height: 8px; border-width: 2px; }
.legend .ln {
  display: inline-block; width: 22px; height: 5px; border-radius: 3px;
  background: #d97706; vertical-align: 2px; margin-left: 5px;
}
.legend .ln.lt { background: #fbd38d; height: 3px; }
.facts { font-size: 15px; }
.facts p { margin: 8px 0; }
.facts .mut { font-size: 13.5px; color: #64748b; }
.chip {
  display: inline-block; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 1px 8px; margin: 0 2px 3px; font-size: 13.5px; font-weight: 600; color: #334155;
}
.chip.warn { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.chip.clk { cursor: pointer; font-family: inherit; }
.chip.clk:hover { border-color: #f59e0b; color: #b45309; }
.chip.more { cursor: pointer; font-family: inherit; background: #fff; border-style: dashed; color: #b45309; }
.sysnote {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 8px 10px; font-size: 13.5px; color: #475569;
}
.tag-sys {
  display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 999px;
  background: #f1f5f9; border: 1px solid #cbd5e1; color: #64748b; font-size: 11.5px; font-weight: 700;
}

.stoplist { margin: 10px 0; font-size: 14px; }
.stoplist summary { cursor: pointer; color: #b45309; font-weight: 700; }
.stoplist ol { margin: 8px 0 0; padding-right: 22px; color: #475569; }
.stoplist li { padding: 1px 0; }
.stoplist li .code { color: #64748b; font-size: 12px; }
.stoplist li.adj { color: #166534; font-weight: 700; }
.stoplist li.skip { color: #b91c1c; font-weight: 800; list-style: none; margin-right: -22px; padding-right: 22px; background: #fef2f2; border-radius: 6px; }
.empty { text-align: center; color: #64748b; padding: 30px 0; }
.more-btn {
  display: block; width: 100%; padding: 12px; margin-top: 4px;
  background: #fff; border: 1px dashed #cbd5e1; border-radius: 12px;
  font-family: inherit; font-size: 15px; color: #b45309; cursor: pointer;
}
.more-btn:hover { border-color: #f59e0b; }

footer { margin-top: 30px; font-size: 13px; color: #64748b; text-align: center; }
footer a { color: #b45309; }

/* תוויות מפה: שכבת התוויות LTR כדי שהיסט הפיקסלים של Leaflet יחושב נכון, הטקסט עצמו RTL */
.leaflet-tooltip-pane { direction: ltr; }
.sk-tip {
  direction: rtl; font-family: "Assistant", sans-serif; font-size: 12.5px; font-weight: 600;
  padding: 2px 7px;
}

@media (max-width: 640px) {
  header h1 { font-size: 24px; }
  .map { height: 260px; }
  .it-head { padding: 10px 10px; }
  .detail { padding: 0 10px 12px; }
}

/* ---- תצוגה לפי תחנה: כמה קווים מדלגים על אותה תחנה ---- */
.chipf.bystop { color: #0f766e; border-color: #99f6e4; }
.chipf.bystop.on { background: #0f766e; border-color: #0f766e; color: #fff; }
.stop-badge {
  flex: 0 0 auto; min-width: 46px; text-align: center; background: #0f766e; color: #fff;
  font-family: "Heebo", sans-serif; font-weight: 800; font-size: 14px;
  border-radius: 9px; padding: 8px 8px;
}
.map.big { height: 420px; }
.lnchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.lnchip {
  border: 2px solid #64748b; background: #64748b; color: #fff; border-radius: 8px;
  min-width: 44px; padding: 4px 10px; font-family: "Heebo", sans-serif; font-weight: 800;
  font-size: 15px; cursor: pointer;
}
.lnchip.off { background: #fff; color: #64748b; border-style: dashed; opacity: .75; }
.lnchips-hint { font-size: 12px; color: #64748b; }
@media (max-width: 640px) { .map.big { height: 320px; } }

/* "מה חדש מאז הביקור הקודם" (שלב ב, סעיף 39) */
.newbar { margin-top: 10px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46;
  border-radius: 12px; padding: 8px 14px; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.newbar .chip.on { background: #059669; color: #fff; border-color: #047857; }
.tag-sys.new { background: #059669; color: #fff; }
