/* ==========================================================================
   Rozkłady jazdy - RzeszówPodkarpackie.com
   Wszystkie reguły są ograniczone do .rj, aby nie kolidować z motywem serwisu.
   Czcionki (opcjonalnie, w <head>):
   <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap" rel="stylesheet">
   ========================================================================== */

.rj {
  --rj-navy: #12305A;
  --rj-navy-dark: #0C2242;
  --rj-bg: #F2F4F7;
  --rj-surface: #FFFFFF;
  --rj-surface-2: #F8F9FB;
  --rj-line: #c2cad4;
  --rj-line-soft: #E6EAF0;
  --rj-field: #9AA6B8;
  --rj-ink: #15233B;
  --rj-ink-2: #344054;
  --rj-soft: #475467;
  --rj-accent: #B4610E;
  --rj-focus: #2F6FED;
  --rj-info-bg: #EAF1FB;
  --rj-info-line: #BFD3F5;
  --rj-err-bg: #FDECEC;
  --rj-err-ink: #8A1C1C;
  --rj-radius: 8px;
  --rj-radius-s: 6px;
  --rj-sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --rj-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  background: var(--rj-bg);
  color: var(--rj-ink);
  font-family: var(--rj-sans);
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: 64px;
  -webkit-font-smoothing: antialiased;
}

.rj *, .rj *::before, .rj *::after { box-sizing: border-box; }
.rj [hidden] { display: none !important; }
.rj a { color: var(--rj-navy); text-underline-offset: 2px; }
.rj a:hover { color: var(--rj-accent); }
.rj :focus-visible { outline: 3px solid var(--rj-focus); outline-offset: 2px; border-radius: 3px; }
.rj h1, .rj h2, .rj h3, .rj p, .rj ul, .rj ol, .rj dl, .rj dd, .rj fieldset { margin: 0; padding: 0; }
.rj fieldset { border: 0; min-width: 0; }

.rj-wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.rj-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rj-muted { color: var(--rj-soft); }
.rj-small { font-size: 14px; line-height:160%;}
.rj-right { text-align: right; }
.rj-num { text-align: right; white-space: nowrap; }
.rj-mt { margin-top: 24px !important; }

/* ---------- Nagłówek strony ---------- */
.rj-pagehead { background: var(--rj-surface); border-bottom: 1px solid var(--rj-line); padding: 20px 0 32px; }
.rj-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--rj-soft); }
.rj-crumbs a { color: var(--rj-soft); }
.rj-crumbs [aria-current] { color: var(--rj-ink); }
.rj-h1 { margin: 18px 0 12px !important; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.2; font-weight: 700; color: var(--rj-navy); letter-spacing: -0.01em; }
.rj-lead { font-size: 18px; color: var(--rj-soft); max-width: 60ch; }
.rj-meta { display: flex; flex-wrap: wrap; margin-top: 24px !important; width: fit-content; max-width: 100%; border: 1px solid var(--rj-line); border-radius: var(--rj-radius-s); background: var(--rj-surface-2); font-size: 14px; }
.rj-meta > div { padding: 10px 20px; border-right: 1px solid var(--rj-line); }
.rj-meta > div:last-child { border-right: 0; }
.rj-meta dt { color: var(--rj-soft); }
.rj-meta dd { font-weight: 600; margin-top: 2px; }

/* ---------- Nagłówek: bloczki obok siebie (meta + „Zmień stację”) ---------- */
.rj-headboxes { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; margin-top: 24px; }
.rj-headboxes > .rj-meta { margin-top: 0 !important; }
.rj-stswitch { flex: 0 1 auto; max-width: 100%; padding: 10px 20px 12px; border: 1px solid var(--rj-line); border-radius: var(--rj-radius-s); background: var(--rj-surface-2); font-size: 14px; }
.rj-stswitch__title { display: block; color: var(--rj-soft); }
.rj-stswitch__list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0 !important; padding: 0 !important; list-style: none; }
.rj-stswitch__list li { margin: 0; padding: 0; }
.rj-stswitch__item { display: inline-block; padding: 4px 10px; border: 1px solid var(--rj-line); border-radius: 999px; background: var(--rj-surface); color: var(--rj-navy); font-weight: 600; line-height: 1.4; text-decoration: none; }
a.rj-stswitch__item:hover { border-color: var(--rj-navy); text-decoration: none; }
a.rj-stswitch__item:focus-visible { outline: 2px solid var(--rj-focus); outline-offset: 2px; }
.rj-stswitch__item[aria-current] { background: var(--rj-navy); border-color: var(--rj-navy); color: #FFFFFF; }
@media (max-width: 640px) {
  .rj-headboxes { flex-direction: column; }
  .rj-stswitch { width: 100%; padding: 8px 12px 10px; }
}

/* ---------- Układ ---------- */
.rj-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 40px; }
.rj-main, .rj-aside { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.rj-card { background: var(--rj-surface); border: 1px solid var(--rj-line); border-radius: var(--rj-radius); }
h2.rj-card__title { padding: 22px 28px 0; font-size: 22px; font-weight: 600; }

/* ---------- Komunikaty ---------- */
.rj-alert { margin-top: 24px; padding: 14px 18px; border-radius: var(--rj-radius-s); }
.rj-alert--error { background: var(--rj-err-bg); color: var(--rj-err-ink); border: 1px solid #F1B8B8; }

/* ---------- Zakładki ---------- */
.rj-tabs { display: flex; padding: 18px 28px 0; border-bottom: 1px solid var(--rj-line); overflow-x: auto; }
.rj-tab {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; white-space: nowrap;
  border: 1px solid transparent; border-top: 3px solid transparent; border-radius: 6px 6px 0 0;
  font-size: 16px; font-weight: 500; color: var(--rj-soft) !important; text-decoration: none;
}
.rj-tab:hover { color: var(--rj-navy) !important; }
.rj-tab[aria-selected="true"] {
  margin-bottom: -1px; background: var(--rj-surface); color: var(--rj-navy) !important; font-weight: 600;
  border-color: var(--rj-line); border-bottom-color: var(--rj-surface); border-top-color: var(--rj-navy);
}

.rj-search{
      background: linear-gradient(180deg, rgb(203 238 232) 19%, rgb(248 249 251) 46%);
}

/* ---------- Formularze ---------- */
.rj-panel { display: flex; flex-direction: column; gap: 20px; padding: 24px 28px 28px; }
.rj-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rj-label { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 0; }
fieldset.rj-field > .rj-label { margin-bottom: 8px; }
.rj-hint { font-size: 14px; color: var(--rj-soft); }
.rj-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 0px;  justify-content: space-between; }
.rj-row--ab { flex-wrap: nowrap; gap: 12px; }
.rj-row--ab .rj-field { flex: 1 1 0; }

.rj-input {
  height: 52px; width: 100%; padding: 0 16px; font: inherit; font-size: 17px; color: var(--rj-ink);
  background: var(--rj-surface); border: 1.5px solid var(--rj-field); border-radius: var(--rj-radius-s);
}
.rj-input:focus { border-color: var(--rj-navy); outline: 3px solid var(--rj-info-line); outline-offset: 0; }
.rj-input--time { width: 120px; }
.rj-input--sm { height: 48px; font-size: 16px; width: 320px; max-width: 100%; }
.rj-select { appearance: auto; }

.rj-seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--rj-field); border-radius: var(--rj-radius-s); overflow: hidden; width: fit-content; max-width: 100%; }
.rj-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rj-seg label { display: inline-flex; align-items: center; min-height: 50px; padding: 0 18px; cursor: pointer; font-size: 15px; background: var(--rj-surface); border-right: 1px solid var(--rj-line); }
.rj-seg label:last-of-type { border-right: 0; }
.rj-seg label:hover { background: var(--rj-surface-2); }
.rj-seg input:checked + label { background: var(--rj-navy); color: #FFFFFF; font-weight: 600; }
.rj-seg input:focus-visible + label { outline: 3px solid var(--rj-focus); outline-offset: -3px; }

.rj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; align-self: flex-start;
  min-height: 52px; padding: 0 32px; border: 0; border-radius: var(--rj-radius-s); cursor: pointer;
  background: var(--rj-navy); color: #FFFFFF !important; font: inherit; font-size: 17px; font-weight: 600; text-decoration: none;
}
.rj-btn:hover { background: var(--rj-navy-dark); }
.rj-btn--ghost { min-height: 40px; padding: 0 16px; font-size: 15px; background: transparent; color: var(--rj-navy) !important; border: 1.5px solid var(--rj-navy); }
.rj-btn--ghost:hover { background: var(--rj-navy); color: #FFFFFF !important; }

.rj-iconbtn {
  flex: 0 0 52px; width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--rj-field); border-radius: var(--rj-radius-s); background: var(--rj-surface); color: var(--rj-navy); cursor: pointer;
}
.rj-iconbtn:hover { border-color: var(--rj-navy); }

.rj-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 28px 24px; padding-top: 16px; border-top: 1px solid var(--rj-line-soft); }
.rj-quick__label { font-size: 14px; color: var(--rj-soft); margin-right: 4px; }
.rj-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; font-size: 14px; text-decoration: none; background: var(--rj-surface-2); border: 1px solid var(--rj-line); border-radius: 4px; }
.rj-chip:hover { border-color: var(--rj-navy); }

/* ---------- Wyniki ---------- */
.rj-result { overflow: hidden; }
.rj-result__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 28px; background: var(--rj-surface-2); border-bottom: 1px solid var(--rj-line); }
.rj-result__title { font-size: 18px; font-weight: 600; line-height: 160%; }
.rj-result__sub { font-size: 14px; color: var(--rj-soft); line-height: 160%; }
p.rj-empty { padding: 24px 28px; color: var(--rj-soft); }
.rj-scroll { overflow-x: auto; }

.rj-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.rj-table th, .rj-table td { padding: 12px 16px; text-align: left; vertical-align: middle; }
.rj-table th:first-child, .rj-table td:first-child { padding-left: 28px; }
.rj-table th:last-child, .rj-table td:last-child { padding-right: 28px; }
.rj-table thead th { font-size: 13px; font-weight: 600; color: var(--rj-soft); letter-spacing: 0.02em; }
.rj-table tbody tr { border-top: 1px solid var(--rj-line-soft); }
.rj-table tbody tr:hover { background: var(--rj-surface-2); }
.rj-table .rj-num { text-align: right; }
.rj-time { font-family: var(--rj-mono); font-weight: 600; font-size: 18px; white-space: nowrap; }
.rj-time--soft { font-weight: 500; color: var(--rj-ink-2); }
.rj-soon { color: var(--rj-accent); font-weight: 600; }

.rj-table--towns thead tr { background: var(--rj-navy); }
.rj-table--towns thead th { color: #FFFFFF; font-size: 14px; letter-spacing: 0; }
.rj-table--towns tbody th { font-weight: 600; }

/* Numer linii – kolory z bazy przez --line-bg / --line-fg */
.rj-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 48px; padding: 3px 9px;
  font-family: var(--rj-mono); font-weight: 600; font-size: 15px; line-height: 1.3; border-radius: 4px;
  background: var(--line-bg, var(--rj-navy)); color: var(--line-fg, #FFFFFF); border: 1.5px solid var(--line-bg, var(--rj-navy));
}
.rj-badge--sub { background: #FFFFFF; color: var(--line-bg, var(--rj-navy)); }
.rj-badge--lg { min-width: 64px; padding: 8px 12px; font-size: 22px; }
a:has(> .rj-badge) { text-decoration: none; }

.rj-choose { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.rj-choose a { display: block; padding: 14px 28px; border-bottom: 1px solid var(--rj-line-soft); text-decoration: none; font-weight: 500; }
.rj-choose a:hover { background: var(--rj-surface-2); }

.rj-linehead { display: flex; align-items: center; gap: 16px; }
.rj-dirs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.rj-dir { padding: 20px 28px; border-right: 1px solid var(--rj-line-soft); }
.rj-dir:last-child { border-right: 0; }
.rj-dir__title { font-size: 16px; font-weight: 600; margin-bottom: 12px !important; }
.rj-stops { list-style: none; position: relative; }
.rj-stops li { position: relative; padding: 5px 0 5px 22px; font-size: 15px; }
.rj-stops li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--rj-surface); border: 2px solid var(--rj-navy); }
.rj-stops li::after { content: ""; position: absolute; left: 8px; top: 22px; bottom: -8px; width: 2px; background: var(--rj-line); }
.rj-stops li:last-child::after { display: none; }
.rj-stops a { text-decoration: none; }
.rj-stops a:hover { text-decoration: underline; }

/* ---------- Kolumna boczna ---------- */
.rj-box { padding: 22px 24px; }
.rj-box__title { font-size: 18px; font-weight: 600; margin-bottom: 14px !important; }
.rj-box--info { background: var(--rj-info-bg); border-color: var(--rj-info-line); }
.rj-box--info p + p { margin-top: 10px; }
.rj-oplist { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px !important; }
.rj-oplist li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--rj-line-soft); }
.rj-oplist__name { font-weight: 600; }
.rj-oplist a { font-size: 15px; font-weight: 600; }
.rj-legend { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.rj-legend li { display: flex; align-items: center; gap: 12px; }
.rj-legend__txt { min-width: 44px; text-align: center; font-family: var(--rj-mono); }

/* ---------- Sekcje ---------- */
.rj-section { padding-top: 56px; }
/* Podsumowanie działu pod nagłówkiem „Linie …” / „Połączenia kolejowe” – mały druk (v13) */
.rj-linesmeta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: -14px 0 16px !important; padding: 0 !important; font-size: 13px; line-height: 1.5; color: var(--rj-soft); }
.rj-linesmeta > div { display: flex; flex-wrap: wrap; gap: 4px; }
.rj-linesmeta dt, .rj-linesmeta dd { margin: 0 !important; }
.rj-linesmeta dd { font-weight: 600; color: var(--rj-ink); }
.rj-section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 24px; padding-bottom: 12px; margin-bottom: 24px; border-bottom: 2px solid var(--rj-navy); }
.rj-h2 { font-size: clamp(22px, 2.2vw, 26px); font-weight: 700; color: var(--rj-navy); line-height:160%; }
.rj-h3 { font-size: 18px; font-weight: 600; margin-bottom: 12px !important; }
.rj-intro { margin: -8px 0 20px !important; color: var(--rj-soft); max-width: 70ch; }

.rj-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
.rj-lines .rj-muted.rj-small { margin: -8px 0 14px; }
.rj-linegrid { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.rj-linechip {
  display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 44px; padding: 0 8px;
  font-family: var(--rj-mono); font-weight: 600; font-size: 16px; text-decoration: none; border-radius: 4px;
  background: var(--line-bg, var(--rj-navy)); color: var(--line-fg, #FFFFFF) !important; border: 1.5px solid var(--line-bg, var(--rj-navy));
}
.rj-linechip:hover { filter: brightness(0.88); }
.rj-linechip--sub { background: #FFFFFF; color: var(--line-bg, var(--rj-navy)) !important; }
.rj-linechip--sub:hover { background: var(--line-bg, var(--rj-navy)); color: #FFFFFF !important; filter: none; }

.rj-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; margin-bottom: 16px; }
.rj-count { margin-left: auto !important; font-size: 14px; color: var(--rj-soft); }

.rj-bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
.rj-prose .rj-h2 { margin-bottom: 16px; }
.rj-prose p { color: var(--rj-ink-2); line-height: 1.65; margin-bottom: 14px; }
.rj-prose .rj-h3 { margin-top: 24px !important; }
.rj-faq .rj-h2 { margin-bottom: 16px; }
.rj-faq details { border-top: 1px solid var(--rj-line); padding: 16px 0; }
.rj-faq details:last-of-type { border-bottom: 1px solid var(--rj-line); }
.rj-faq summary { display: flex; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; font-weight: 600; }
.rj-faq summary::-webkit-details-marker { display: none; }
.rj-faq summary::after { content: "+"; color: var(--rj-navy); font-size: 22px; line-height: 1; transition: transform 0.15s ease; }
.rj-faq details[open] summary::after { transform: rotate(45deg); }
.rj-faq details p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--rj-soft); }

@media (prefers-reduced-motion: reduce) {
  .rj-faq summary::after { transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .rj-top, .rj-lines, .rj-bottom { grid-template-columns: minmax(0, 1fr); }
  .rj-bottom { gap: 40px; }
}

/* ---------- Telefon ---------- */
@media (max-width: 640px) {
  .rj-wrap { padding: 0 16px; }
  .rj-pagehead { padding: 14px 0 22px; }
  .rj-lead { font-size: 16px; }
  .rj-meta { flex-direction: column; width: 100%; }
  .rj-meta > div { border-right: 0; border-bottom: 1px solid var(--rj-line); padding: 8px 12px; }
  .rj-meta > div:last-child { border-bottom: 0; }
  .rj-top { padding-top: 16px; gap: 16px; }
  .rj-card__title { padding: 16px 16px 0; font-size: 19px; }
  .rj-tabs { padding: 14px 16px 0; }
  .rj-tab { padding: 0 14px; font-size: 15px; }
  .rj-panel { padding: 16px 16px 4px; }
  .rj-quick { margin: 12px 16px 16px; }
  .rj-row--ab { flex-direction: column; align-items: stretch; }
  .rj-iconbtn { align-self: center; transform: rotate(90deg); }
  .rj-seg { width: 100%; }
  .rj-seg label { flex: 1 1 auto; justify-content: center; padding: 0 10px; font-size: 14px; }
  .rj-btn { width: 100%; }
  .rj-btn--ghost { width: auto; }
  .rj-input--time { width: 100%; }
  .rj-row > .rj-field { width: 100%; }
  .rj-result__head { padding: 12px 16px; }
  .rj-empty { padding: 20px 16px; }
  .rj-table { font-size: 15px; }
  .rj-table th, .rj-table td { padding: 10px 8px; }
  .rj-table th:first-child, .rj-table td:first-child { padding-left: 16px; }
  .rj-table th:last-child, .rj-table td:last-child { padding-right: 16px; }
  .rj-time { font-size: 16px; }
  .rj-dir { padding: 16px; border-right: 0; border-bottom: 1px solid var(--rj-line-soft); }
  .rj-choose a { padding: 12px 16px; }
  .rj-section { padding-top: 40px; }
  .rj-count { margin-left: 0 !important; }
  .rj-input--sm { width: 100%; }
  .rj-filters .rj-field { width: 100%; }
  .rj-hide-sm { display: none; }
}



/* ---------- Podpowiedzi przystanków ---------- */
.rj-ac { position: relative; }
.rj-ac .rj-input { width: 100%; }
.rj-ac__list {
  position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: 4px 0; list-style: none;
  background: var(--rj-surface); border: 1px solid var(--rj-line);
  border-radius: var(--rj-radius); box-shadow: 0 8px 24px rgba(21, 35, 59, .14);
  max-height: 320px; overflow-y: auto;
}
.rj-ac__opt {
  padding: 10px 16px; cursor: pointer; font-size: 16px; color: var(--rj-ink);
  border-bottom: 1px solid var(--rj-line-soft);
}
.rj-ac__opt:last-child { border-bottom: 0; }
.rj-ac__opt:hover, .rj-ac__opt.is-active { background: var(--rj-info-bg); color: var(--rj-navy); }
.rj-ac__opt mark { background: none; color: inherit; font-weight: 700; }
/* Wyjaśnienie nad podpowiedziami (np. po wpisaniu samego „Rzeszów”) (v8) */
.rj-ac__note {
  position: sticky; top: -4px; z-index: 1; margin-top: -4px; padding: 10px 16px;
  font-size: 13px; line-height: 1.4; color: var(--rj-soft); cursor: default;
  background: var(--rj-info-bg); border-bottom: 1px solid var(--rj-line-soft);
}



/* ==========================================================================
   DOPISZ NA KOŃCU assets/rozklady-jazdy.css
   Strona linii (tabliczka przystankowa) i strona przystanku
   ========================================================================== */

/* ---------- Nagłówek linii ---------- */
.rj-linehead { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin: 18px 0 4px; }
.rj-linehead .rj-h1 { margin: 0 !important; }
.rj-h1__sub { display: block; margin-top: 4px; font-size: 18px; font-weight: 500; color: var(--rj-soft); letter-spacing: 0; }

/* ---------- Kierunek i dzień ---------- */
.rj-lp { display: flex; flex-direction: column; gap: 24px; padding-top: 32px; }
.rj-lp__controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; padding: 20px 28px; }

.rj-dirswitch { display: flex; flex-wrap: wrap; gap: 8px; }
.rj-dirswitch a {
  display: flex; flex-direction: column; gap: 1px; min-width: 220px; padding: 9px 18px;
  background: var(--rj-surface); color: var(--rj-ink); text-decoration: none;
  border: 1.5px solid var(--rj-field); border-radius: var(--rj-radius-s);
}
.rj-dirswitch a:hover { border-color: var(--rj-navy); color: var(--rj-navy); text-decoration: none; }
.rj-dirswitch small { font-size: 13px; color: var(--rj-soft); }
.rj-dirswitch strong { font-size: 17px; font-weight: 600; }
.rj-dirswitch a[aria-current] { background: var(--rj-navy); border-color: var(--rj-navy); color: #FFFFFF; }
.rj-dirswitch a[aria-current] small { color: rgba(255, 255, 255, .75); }
.rj-dirswitch a[aria-current] strong { color: #FFFFFF; }

.rj-seg--links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; font-size: 15px;
  background: var(--rj-surface); color: var(--rj-ink); text-decoration: none; border-right: 1px solid var(--rj-line);
}
.rj-seg--links a:last-child { border-right: 0; }
.rj-seg--links a:hover { background: var(--rj-surface-2); color: var(--rj-navy); text-decoration: none; }
.rj-seg--links a[aria-current] { background: var(--rj-navy); color: #FFFFFF; font-weight: 600; }

/* ---------- Układ: tabliczka + trasa ---------- */
.rj-lp__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.rj-lp__pick { display: flex; flex-direction: column; gap: 8px; padding: 20px 28px; border-bottom: 1px solid var(--rj-line); }
.rj-lp__pickrow { display: flex; gap: 12px; }
.rj-lp__pickrow .rj-select { flex: 1 1 auto; }

.rj-tt .rj-result__head { flex-wrap: wrap; }
.rj-tt .rj-result__title .rj-muted { font-weight: 500; line-height:160%; }

/* Najbliższe odjazdy */
.rj-next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 28px; background: #FFF6EC; border-bottom: 1px solid #F3DCC2; }
.rj-next__label { margin-right: 6px; font-size: 15px; font-weight: 600; }
.rj-next__item {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 14px; cursor: pointer;
  font: inherit; color: var(--rj-ink); background: var(--rj-surface);
  border: 1.5px solid #E9CFAF; border-radius: var(--rj-radius-s);
}
.rj-next__item:first-of-type { border-color: var(--rj-accent); }
.rj-next__item:hover { border-color: var(--rj-navy); }
.rj-next__in { font-size: 14px; color: var(--rj-soft); }
.rj-next__in.rj-soon { color: var(--rj-accent); }

/* Tabliczka: godzina | minuty */
.rj-hours { width: 100%; border-collapse: collapse; }
.rj-hours tr { border-top: 1px solid var(--rj-line-soft); }
.rj-hours tr:first-child { border-top: 0; }
.rj-hours tr:nth-child(even) { background: var(--rj-surface-2); }
.rj-hours th {
  width: 76px; padding: 10px 0 10px 28px; text-align: left; vertical-align: top;
  font-family: var(--rj-mono); font-size: 20px; font-weight: 700; line-height: 36px; color: var(--rj-navy);
  border-right: 2px solid var(--rj-line);
}
.rj-hours td { padding: 10px 28px 10px 14px; }
.rj-hours tr.is-past th { color: #98A2B3; }
.rj-hours__mins { display: flex; flex-wrap: wrap; gap: 4px 6px; }

.rj-min {
  position: relative; min-width: 46px; height: 36px; padding: 0 8px; cursor: pointer;
  font-family: var(--rj-mono); font-size: 17px; font-weight: 600; color: var(--rj-ink);
  background: transparent; border: 1px solid transparent; border-radius: 4px;
}
.rj-min:hover { background: var(--rj-surface); border-color: var(--rj-navy); color: var(--rj-navy); }
.rj-min sup { margin-left: 1px; font-size: 11px; font-weight: 700; color: var(--rj-accent); }
.rj-min.is-past { color: #98A2B3; font-weight: 500; }
.rj-min.is-next { background: var(--rj-accent); border-color: var(--rj-accent); color: #FFFFFF; }
.rj-min.is-next sup { color: #FFFFFF; }

.rj-tt__foot { padding: 14px 28px 20px; border-top: 1px solid var(--rj-line); font-size: 14px; color: var(--rj-soft); }
.rj-marks { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 8px !important; color: var(--rj-ink-2); }
.rj-marks strong { font-family: var(--rj-mono); color: var(--rj-accent); margin-right: 4px; }

/* Trasa (schemat przystanków) */
.rj-lp__route { position: sticky; top: 16px; max-height: calc(100vh - 132px); overflow-y: auto; }
.rj-route { list-style: none; }
.rj-route li { position: relative; }
.rj-route li::after { content: ""; position: absolute; left: 15px; top: 0; bottom: 0; width: 2px; background: var(--rj-line); pointer-events: none; }
.rj-route li:first-child::after { top: 50%; }
.rj-route li:last-child::after { bottom: 50%; }
.rj-route li::before {
  content: ""; position: absolute; z-index: 1; left: 10px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%; background: var(--rj-surface); border: 2px solid var(--rj-navy); pointer-events: none;
}
.rj-route li.is-end::before { background: var(--rj-navy); }
.rj-route li.is-active::before { width: 16px; height: 16px; margin-top: -8px; left: 8px; background: var(--rj-accent); border-color: var(--rj-accent); }
.rj-route a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 7px 10px 7px 36px; border-radius: 4px; font-size: 15px; color: var(--rj-ink); text-decoration: none;
}
.rj-route a:hover { background: var(--rj-surface-2); color: var(--rj-navy); text-decoration: none; }
.rj-route li.is-end a { font-weight: 600; }
.rj-route li.is-active a { background: var(--rj-info-bg); color: var(--rj-navy); font-weight: 600; }
.rj-route__nr { flex: none; font-family: var(--rj-mono); font-size: 12px; font-weight: 500; color: var(--rj-soft); }

/* Przebieg kursu (okno) */
.rj-dlg {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; overflow-y: auto;
  border: 0; border-radius: var(--rj-radius); color: var(--rj-ink); font-family: var(--rj-sans);
  box-shadow: 0 24px 64px rgba(12, 34, 66, .3);
}
.rj-dlg::backdrop { background: rgba(12, 34, 66, .55); }
.rj-dlg__head {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 18px 24px; background: var(--rj-surface-2); border-bottom: 1px solid var(--rj-line);
}
.rj-dlg__head .rj-iconbtn { flex: 0 0 44px; width: 44px; height: 44px; }
.rj-trip { list-style: none; margin: 0; padding: 8px 0 12px; }
.rj-trip li { display: flex; align-items: baseline; gap: 18px; padding: 7px 24px; font-size: 15px; }
.rj-trip li.is-before { color: #98A2B3; }
.rj-trip li.is-current { background: var(--rj-info-bg); color: var(--rj-navy); font-weight: 600; }
.rj-trip .rj-time { min-width: 52px; font-size: 16px; }

/* ---------- Strona przystanku ---------- */
.rj-stopform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 12px; padding: 20px 28px; border-bottom: 1px solid var(--rj-line); }
.rj-table--board .rj-time { font-size: 20px; }
.rj-table--board .rj-in { white-space: nowrap; font-size: 15px; color: var(--rj-soft); }
.rj-table--board .rj-in.rj-soon { color: var(--rj-accent); }
.rj-board__dir { font-weight: 500; }
.rj-more { padding: 16px 28px; border-top: 1px solid var(--rj-line-soft); }

.rj-box__intro { margin: -6px 0 10px !important; line-height: 160%; }
.rj-atstop { list-style: none; }
.rj-atstop a {
  display: flex; align-items: center; gap: 12px; padding: 9px 0;
  border-bottom: 1px solid var(--rj-line-soft); color: var(--rj-ink); text-decoration: none;
}
.rj-atstop li:last-child a { border-bottom: 0; }
.rj-atstop a:hover { color: var(--rj-navy); text-decoration: none; }
.rj-atstop a:hover .rj-atstop__dir { text-decoration: underline; }
.rj-atstop__dir { font-size: 15px; }
.rj-prose--narrow { max-width: 75ch; }

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .rj-lp__grid { grid-template-columns: minmax(0, 1fr); }
  .rj-lp__route { position: static; max-height: none; }
}

/* ---------- Telefon ---------- */
@media (max-width: 640px) {
  .rj-lp { padding-top: 16px; gap: 16px; }
  .rj-lp__controls { flex-direction: column; align-items: stretch; padding: 16px; }
  .rj-dirswitch { flex-direction: column; }
  .rj-dirswitch a { min-width: 0; }
  .rj-seg--links a { flex: 1 1 auto; justify-content: center; padding: 0 10px; font-size: 14px; }
  .rj-lp__pick, .rj-next, .rj-tt__foot, .rj-stopform, .rj-more { padding-left: 16px; padding-right: 16px; }
  .rj-hours th { width: 56px; padding-left: 16px; font-size: 18px; }
  .rj-hours td { padding: 8px 12px 8px 10px; }
  .rj-min { min-width: 42px; padding: 0 5px; font-size: 16px; }
  .rj-tt .rj-result__head .rj-btn--ghost { width: 100%; }
  .rj-stopform { flex-direction: column; align-items: stretch; }
  .rj-table--board .rj-time { font-size: 18px; }
  .rj-trip li { padding: 7px 16px; }
  .rj-dlg__head { padding: 14px 16px; }
}


/* ==========================================================================
   DOPISZ NA KOŃCU assets/rozklady-jazdy.css
   Strona linii (tabliczka przystankowa) i strona przystanku
   ========================================================================== */

/* ---------- Nagłówek linii ---------- */
.rj-linehead { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin: 18px 0 4px; }
.rj-linehead .rj-h1 { margin: 0 !important; }
.rj-h1__sub { display: block; margin-top: 4px; font-size: 18px; font-weight: 500; color: var(--rj-soft); letter-spacing: 0; }

/* ---------- Kierunek i dzień ---------- */
.rj-lp { display: flex; flex-direction: column; gap: 24px; padding-top: 32px; }
.rj-lp__controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; padding: 20px 28px; }

.rj-dirswitch { display: flex; flex-wrap: wrap; gap: 8px; }
.rj-dirswitch a {
  display: flex; flex-direction: column; gap: 1px; min-width: 220px; padding: 9px 18px;
  background: var(--rj-surface); color: var(--rj-ink); text-decoration: none;
  border: 1.5px solid var(--rj-field); border-radius: var(--rj-radius-s);
}
.rj-dirswitch a:hover { border-color: var(--rj-navy); color: var(--rj-navy); text-decoration: none; }
.rj-dirswitch small { font-size: 13px; color: var(--rj-soft); }
.rj-dirswitch strong { font-size: 17px; font-weight: 600; }
.rj-dirswitch a[aria-current] { background: var(--rj-navy); border-color: var(--rj-navy); color: #FFFFFF; }
.rj-dirswitch a[aria-current] small { color: rgba(255, 255, 255, .75); }

.rj-seg--links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; font-size: 15px;
  background: var(--rj-surface); color: var(--rj-ink); text-decoration: none; border-right: 1px solid var(--rj-line);
}
.rj-seg--links a:last-child { border-right: 0; }
.rj-seg--links a:hover { background: var(--rj-surface-2); color: var(--rj-navy); text-decoration: none; }
.rj-seg--links a[aria-current] { background: var(--rj-navy); color: #FFFFFF; font-weight: 600; }

/* ---------- Układ: tabliczka + trasa ---------- */
.rj-lp__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.rj-lp__pick { display: flex; flex-direction: column; gap: 8px; padding: 20px 28px; border-bottom: 1px solid var(--rj-line); }
.rj-lp__pickrow { display: flex; gap: 12px; }
.rj-lp__pickrow .rj-select { flex: 1 1 auto; }

.rj-tt .rj-result__head { flex-wrap: wrap; }
.rj-tt .rj-result__title .rj-muted { font-weight: 500; }

/* Najbliższe odjazdy */
.rj-next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 28px; background: #FFF6EC; border-bottom: 1px solid #F3DCC2; }
.rj-next__label { margin-right: 6px; font-size: 15px; font-weight: 600; }
.rj-next__item {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 14px; cursor: pointer;
  font: inherit; color: var(--rj-ink); background: var(--rj-surface);
  border: 1.5px solid #E9CFAF; border-radius: var(--rj-radius-s);
}
.rj-next__item:first-of-type { border-color: var(--rj-accent); }
.rj-next__item:hover { border-color: var(--rj-navy); }
.rj-next__in { font-size: 14px; color: var(--rj-soft); }
.rj-next__in.rj-soon { color: var(--rj-accent); }

/* Tabliczka: godzina | minuty */
.rj-hours { width: 100%; border-collapse: collapse; }
.rj-hours tr { border-top: 1px solid var(--rj-line-soft); }
.rj-hours tr:first-child { border-top: 0; }
.rj-hours tr:nth-child(even) { background: var(--rj-surface-2); }
.rj-hours th {
  width: 76px; padding: 10px 0 10px 28px; text-align: left; vertical-align: top;
  font-family: var(--rj-mono); font-size: 20px; font-weight: 700; line-height: 36px; color: var(--rj-navy);
  border-right: 2px solid var(--rj-line);
}
.rj-hours td { padding: 10px 28px 10px 14px; }
.rj-hours tr.is-past th { color: #98A2B3; }
.rj-hours__mins { display: flex; flex-wrap: wrap; gap: 4px 6px; }

.rj-min {
  position: relative; min-width: 46px; height: 36px; padding: 0 8px; cursor: pointer;
  font-family: var(--rj-mono); font-size: 17px; font-weight: 600; color: var(--rj-ink);
  background: transparent; border: 1px solid transparent; border-radius: 4px;
}
.rj-min:hover { background: var(--rj-surface); border-color: var(--rj-navy); color: var(--rj-navy); }
.rj-min sup { margin-left: 1px; font-size: 11px; font-weight: 700; color: var(--rj-accent); }
.rj-min.is-past { color: #98A2B3; font-weight: 500; }
.rj-min.is-next { background: var(--rj-accent); border-color: var(--rj-accent); color: #FFFFFF; }
.rj-min.is-next sup { color: #FFFFFF; }

.rj-tt__foot { padding: 14px 28px 20px; border-top: 1px solid var(--rj-line); font-size: 14px; color: var(--rj-soft); }
.rj-marks { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 8px !important; color: var(--rj-ink-2); }
.rj-marks strong { font-family: var(--rj-mono); color: var(--rj-accent); margin-right: 4px; }

/* Trasa (schemat przystanków) */
.rj-lp__route { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.rj-route { list-style: none; }
.rj-route li { position: relative; }
.rj-route li::after { content: ""; position: absolute; left: 15px; top: 0; bottom: 0; width: 2px; background: var(--rj-line); pointer-events: none; }
.rj-route li:first-child::after { top: 50%; }
.rj-route li:last-child::after { bottom: 50%; }
.rj-route li::before {
  content: ""; position: absolute; z-index: 1; left: 10px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%; background: var(--rj-surface); border: 2px solid var(--rj-navy); pointer-events: none;
}
.rj-route li.is-end::before { background: var(--rj-navy); }
.rj-route li.is-active::before { width: 16px; height: 16px; margin-top: -8px; left: 8px; background: var(--rj-accent); border-color: var(--rj-accent); }
.rj-route a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 7px 10px 7px 36px; border-radius: 4px; font-size: 15px; color: var(--rj-ink); text-decoration: none;
}
.rj-route a:hover { background: var(--rj-surface-2); color: var(--rj-navy); text-decoration: none; }
.rj-route li.is-end a { font-weight: 600; }
.rj-route li.is-active a { background: var(--rj-info-bg); color: var(--rj-navy); font-weight: 600; }
.rj-route__nr { flex: none; font-family: var(--rj-mono); font-size: 12px; font-weight: 500; color: var(--rj-soft); }

/* Przebieg kursu (okno) */
.rj-dlg {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; overflow-y: auto;
  border: 0; border-radius: var(--rj-radius); color: var(--rj-ink); font-family: var(--rj-sans);
  box-shadow: 0 24px 64px rgba(12, 34, 66, .3);
}
.rj-dlg::backdrop { background: rgba(12, 34, 66, .55); }
.rj-dlg__head {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 18px 24px; background: var(--rj-surface-2); border-bottom: 1px solid var(--rj-line);
}
.rj-dlg__head .rj-iconbtn { flex: 0 0 44px; width: 44px; height: 44px; }
.rj-trip { list-style: none; margin: 0; padding: 8px 0 12px; }
.rj-trip li { display: flex; align-items: baseline; gap: 18px; padding: 7px 24px; font-size: 15px; }
.rj-trip li.is-before { color: #98A2B3; }
.rj-trip li.is-current { background: var(--rj-info-bg); color: var(--rj-navy); font-weight: 600; }
.rj-trip .rj-time { min-width: 52px; font-size: 16px; }

/* ---------- Strona przystanku ---------- */
.rj-stopform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 12px; padding: 20px 28px; border-bottom: 1px solid var(--rj-line); }
.rj-table--board .rj-time { font-size: 20px; }
.rj-table--board .rj-in { white-space: nowrap; font-size: 15px; color: var(--rj-soft); }
.rj-table--board .rj-in.rj-soon { color: var(--rj-accent); }
.rj-board__dir { font-weight: 500; }
.rj-more { padding: 16px 28px; border-top: 1px solid var(--rj-line-soft); }

.rj-box__intro { margin: -6px 0 10px !important; }
.rj-atstop { list-style: none; }
.rj-atstop a {
  display: flex; align-items: center; gap: 12px; padding: 9px 0;
  border-bottom: 1px solid var(--rj-line-soft); color: var(--rj-ink); text-decoration: none;
}
.rj-atstop li:last-child a { border-bottom: 0; }
.rj-atstop a:hover { color: var(--rj-navy); text-decoration: none; }
.rj-atstop a:hover .rj-atstop__dir { text-decoration: underline; }
.rj-atstop__dir { font-size: 15px; }
.rj-prose--narrow { max-width: 75ch; }

/* Przełącznik stanowisk (01 / 02 – dwie strony ulicy): zwarta lista, powyżej 2 pozycji zwinięta pod „Zobacz więcej” */
.rj-posts { padding: 16px 28px 18px; }
.rj-posts__title { font-size: 17px; font-weight: 600; margin-bottom: 8px !important; line-height: 160%; }
.rj-posts__list { list-style: none; margin: 0 !important; padding: 0 !important; display: flex; flex-direction: column; gap: 2px; }
.rj-posts__item { margin: 0; padding: 0; }
.rj-posts.is-collapsed .rj-posts__item--more { display: none; }
.rj-post {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; padding: 6px 10px;
  color: var(--rj-ink); text-decoration: none;
  border-left: 3px solid transparent; border-radius: var(--rj-radius-s);
}
.rj-post:hover { background: var(--rj-surface-2); border-left-color: var(--rj-navy); color: var(--rj-ink); text-decoration: none; }
.rj-post__nr { font-size: 15px; font-weight: 700; color: var(--rj-navy); white-space: nowrap; }
.rj-post__dir { font-size: 14px; color: var(--rj-soft); }
.rj-post[aria-current] { background: var(--rj-info-bg); border-left-color: var(--rj-navy); }
.rj-posts__more {
  margin: 6px 0 0 10px; padding: 0; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--rj-navy); text-decoration: underline; text-underline-offset: 2px;
}
.rj-posts__more:hover { color: var(--rj-accent); }

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .rj-lp__grid { grid-template-columns: minmax(0, 1fr); }
  .rj-lp__route { position: static; max-height: none; }
}

/* ---------- Telefon ---------- */
@media (max-width: 640px) {
  .rj-lp { padding-top: 16px; gap: 16px; }
  .rj-lp__controls { flex-direction: column; align-items: stretch; padding: 16px; }
  .rj-dirswitch { flex-direction: column; }
  .rj-dirswitch a { min-width: 0; }
  .rj-seg--links a { flex: 1 1 auto; justify-content: center; padding: 0 10px; font-size: 14px; }
  .rj-lp__pick, .rj-next, .rj-tt__foot, .rj-stopform, .rj-more, .rj-posts { padding-left: 16px; padding-right: 16px; }
  .rj-hours th { width: 56px; padding-left: 16px; font-size: 18px; }
  .rj-hours td { padding: 8px 12px 8px 10px; }
  .rj-min { min-width: 42px; padding: 0 5px; font-size: 16px; }
  .rj-tt .rj-result__head .rj-btn--ghost { width: 100%; }
  .rj-stopform { flex-direction: column; align-items: stretch; }
  .rj-table--board .rj-time { font-size: 18px; }
  .rj-trip li { padding: 7px 16px; }
  .rj-dlg__head { padding: 14px 16px; }
}


/* ---------- MPK vs komunikacja podmiejska ---------- */
.rj { --rj-sub: #00707A; --rj-sub-bg: #EAF6F7; --rj-sub-line: #A6D8DC; --rj-city: #D32A00; }

.rj-quick { flex-direction: column; align-items: stretch; gap: 12px; }
.rj-quick__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rj-quick__label { min-width: 190px; }
.rj-quick__more { font-size: 14px; margin-left: 4px; }
.rj-chip__nr { margin-left: 8px; padding: 0 5px; font-family: var(--rj-mono); font-size: 12px; color: var(--rj-soft); border: 1px solid var(--rj-line); border-radius: 3px; }
.rj-chip--sub { background: var(--rj-sub-bg); border-color: var(--rj-sub-line); color: var(--rj-sub) !important; }
.rj-chip--sub:hover { border-color: var(--rj-sub); }

.rj-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; font-size: 12px; font-weight: 600; line-height: 1.5; vertical-align: 1px; white-space: nowrap; border-radius: 3px; }
.rj-tag--sub { background: var(--rj-sub-bg); color: var(--rj-sub); border: 1px solid var(--rj-sub-line); }

.rj-linesbox { border-top: 4px solid var(--rj-navy); }
.rj-linesbox--city { border-top-color: var(--rj-city); }
.rj-linesbox--sub { border-top-color: var(--rj-sub); }
.rj-linesbox .rj-h3 { margin-bottom: 4px !important; }
.rj-linesbox > .rj-muted.rj-small { margin: 0 0 14px !important; }
.rj-linesbox .rj-linegrid + .rj-quick__more { display: inline-block; margin-top: 16px; }
.rj-h4 { margin: 20px 0 10px !important; font-size: 15px; font-weight: 600; color: var(--rj-soft); }

@media (max-width: 640px) {
  .rj-quick__label { min-width: 0; width: 100%; }
}



.rj-conn-h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; }
.rj-conn-h1__arrow { color: var(--rj-accent); font-weight: 500; }

.rj-conn-ctrl {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 28px;
  padding: 20px 28px; margin-bottom: 24px;
}
.rj-conn-time { margin: 0; }
.rj-conn-time__row { display: flex; gap: 8px; }
.rj-conn-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-left: auto; }
.rj-conn-actions .rj-btn--ghost { display: inline-flex; align-items: center; gap: 8px; }
.rj-conn-edit { font-size: 15px; }

.rj-table--conn .rj-time--soft { font-size: 17px; }
.rj-conn-dur { display: block; font-size: 13px; color: var(--rj-soft); white-space: nowrap; }
.rj-conn-hs { margin-left: 6px; font-size: 15px; }
.rj-table--conn tr.is-next td { background: #FFF6EC; }
.rj-table--conn tr.is-next td:first-child { box-shadow: inset 4px 0 0 var(--rj-accent); }

@media (max-width: 640px) {
  .rj-conn-ctrl { flex-direction: column; align-items: stretch; padding: 16px; margin-bottom: 16px; }
  .rj-conn-actions { margin-left: 0; flex-direction: column; align-items: stretch; }
  .rj-conn-actions .rj-btn--ghost { justify-content: center; }
  .rj-conn-time__row .rj-btn { width: auto; }
  .rj-conn-hs { display: block; margin: 4px 0 0; }
}

/* ==========================================================================
   Podział na działy: MPK / PKS i podmiejskie / Pociągi (v4)
   ========================================================================== */
.rj { --rj-rail: #1F7A3A; --rj-rail-bg: #EAF5EE; }

/* ---------- Przełącznik działów w nagłówku ---------- */
.rj-secnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.rj-secnav__item {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  color: var(--rj-ink) !important; background: var(--rj-surface-2);
  border: 1.5px solid var(--rj-line); border-radius: 999px;
}
.rj-secnav__item::before { content: ""; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--rj-navy); }
.rj-secnav__item--mpk::before { background: var(--rj-city); }
.rj-secnav__item--pks::before { background: var(--rj-sub); }
.rj-secnav__item--pociagi::before { background: var(--rj-rail); }
.rj-secnav__item:hover { border-color: var(--rj-navy); text-decoration: none; }
.rj-secnav__item[aria-current="page"] { background: var(--rj-navy); border-color: var(--rj-navy); color: #FFFFFF !important; }
.rj-secnav__item[aria-current="page"]::before { box-shadow: 0 0 0 2px #FFFFFF; }

/* ---------- Kolor akcentu działu ---------- */
.rj--mpk .rj-pagehead { border-top: 4px solid var(--rj-city); }
.rj--pks .rj-pagehead { border-top: 4px solid var(--rj-sub); }
.rj--pociagi .rj-pagehead { border-top: 4px solid var(--rj-rail); }

/* ---------- Lista „Inne rozkłady jazdy” ---------- */
.rj-seclist { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.rj-seclist__item {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; text-decoration: none;
  border: 1px solid var(--rj-line); border-left: 4px solid var(--rj-navy); border-radius: var(--rj-radius-s);
}
.rj-seclist__item--mpk { border-left-color: var(--rj-city); }
.rj-seclist__item--pks { border-left-color: var(--rj-sub); }
.rj-seclist__item--pociagi { border-left-color: var(--rj-rail); }
.rj-seclist__item strong { font-size: 16px; }
.rj-seclist__item span { font-size: 14px; color: var(--rj-soft); }
.rj-seclist__item:hover { background: var(--rj-surface-2); text-decoration: none; }

/* ---------- Główne stacje w regionie (strona działu pociągów) ---------- */
.rj-stationlist { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rj-stationlist li { margin: 0; padding: 0; }
.rj-stationlist__item {
  display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 8px 12px;
  border: 1px solid var(--rj-line); border-left: 4px solid var(--rj-rail); border-radius: var(--rj-radius-s);
  color: var(--rj-ink); text-decoration: none;
}
.rj-stationlist__item strong { font-size: 15px; color: var(--rj-navy); }
.rj-stationlist__item span { font-size: 13px; color: var(--rj-soft); }
.rj-stationlist__item:hover { background: var(--rj-surface-2); border-color: var(--rj-navy); border-left-color: var(--rj-rail); text-decoration: none; }
.rj-stationlist__item:focus-visible { outline: 2px solid var(--rj-focus); outline-offset: 2px; }

/* ---------- Lista połączeń kolejowych ---------- */
.rj-routelist { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); overflow: hidden; }
.rj-routelist a {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px; height: 100%;
  text-decoration: none; color: var(--rj-ink); border-bottom: 1px solid var(--rj-line-soft); border-right: 1px solid var(--rj-line-soft);
}
.rj-routelist a:hover { background: var(--rj-surface-2); }
.rj-routelist a:hover .rj-routelist__name { text-decoration: underline; }
.rj-routelist__name { font-weight: 500; }

/* ---------- Podpowiedzi: rodzaj wyniku ---------- */
.rj-ac__kind { margin-left: 8px; font-size: 12px; color: var(--rj-soft); text-transform: uppercase; letter-spacing: .03em; }

/* ---------- Strona główna /rozklady-jazdy/ ---------- */
.rj-hubsearch { margin-top: 24px; max-width: 640px; display: flex; flex-direction: column; gap: 8px; }
.rj-hubsearch__row { display: flex; gap: 10px; align-items: stretch; }
.rj-hubsearch__row .rj-ac, .rj-hubsearch__row > .rj-input { flex: 1 1 auto; }

.rj-hub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 40px; }
.rj-hubcard { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-top: 5px solid var(--rj-navy); }
.rj-hubcard--mpk { border-top-color: var(--rj-city); }
.rj-hubcard--pks { border-top-color: var(--rj-sub); }
.rj-hubcard--pociagi { border-top-color: var(--rj-rail); }
.rj-hubcard__icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 12px; background: var(--rj-info-bg); color: var(--rj-navy); }
.rj-hubcard--mpk .rj-hubcard__icon { background: #FDECE7; color: var(--rj-city); }
.rj-hubcard--pks .rj-hubcard__icon { background: var(--rj-sub-bg); color: var(--rj-sub); }
.rj-hubcard--pociagi .rj-hubcard__icon { background: var(--rj-rail-bg); color: var(--rj-rail); }
.rj-hubcard__title { font-size: 22px; font-weight: 700; line-height: 1.25; }
.rj-hubcard__title a { color: var(--rj-navy); text-decoration: none; }
.rj-hubcard__title a:hover { text-decoration: underline; }
.rj-hubcard__text { color: var(--rj-ink-2); }
.rj-hubcard__meta { display: flex; flex-direction: column; gap: 6px; font-size: 14px; padding: 12px 0!important; border-top: 1px solid var(--rj-line-soft); border-bottom: 1px solid var(--rj-line-soft); }
.rj-hubcard__meta > div { display: flex; gap: 8px; }
.rj-hubcard__meta dt { color: var(--rj-soft); min-width: 96px; }
.rj-hubcard__meta dd { font-weight: 600; }
.rj-hubcard__lines .rj-linechip { min-width: 40px; }
.rj-hubcard__cta { margin-top: auto; align-self: flex-start; text-decoration: none; }

@media (max-width: 1000px) {
  .rj-hub { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .rj-hub { padding-top: 16px; gap: 16px; }
  .rj-hubcard { padding: 18px 16px; }
  .rj-hubsearch__row { flex-direction: column; }
  .rj-hubcard__cta { align-self: stretch; text-align: center; justify-content: center; }
  .rj-routelist { grid-template-columns: minmax(0, 1fr); }
  .rj-routelist a { padding: 12px 16px; border-right: 0; }
  .rj-secnav__item { flex: 1 1 auto; justify-content: center; }
}


/* ==========================================================================
   Mapa przystanków (Leaflet + OpenStreetMap) (v5)
   ========================================================================== */
.rj-mapcard { overflow: hidden; }
.rj-map { position: relative; height: 420px; background: #E8ECEF; z-index: 0; }
.rj-aside .rj-map { height: 340px; }
.rj-map__msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0 !important; padding: 16px !important; color: var(--rj-soft); font-size: 15px; text-align: center; }
.rj-map__hint { padding: 10px 20px 14px !important; font-size: 13px; color: var(--rj-soft); line-height: 160%; }
.rj-map__zoomhint {
  position: absolute; z-index: 800; left: 50%; bottom: 14px; transform: translateX(-50%);
  padding: 6px 12px; font-size: 13px; font-weight: 600; white-space: nowrap;
  background: rgba(21, 35, 59, .85); color: #FFFFFF; border-radius: 999px;
  pointer-events: none; opacity: 0; transition: opacity .2s ease;
}
.rj-map__zoomhint.is-on { opacity: 1; }

.rj .leaflet-container { font-family: var(--rj-sans); font-size: 14px; }
.rj .leaflet-container a { color: var(--rj-navy); }
.rj .leaflet-control-zoom a, .rj-map__btn { color: var(--rj-ink) !important; }
.rj-map__btn {
  display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; cursor: pointer;
  background: #FFFFFF; border: 2px solid rgba(0, 0, 0, .2); border-radius: 4px; background-clip: padding-box;
}
.rj-map__btn:hover { background: #F4F4F4; }

/* Pinezka z etykietą (numer stanowiska lub nazwa) – czubek wskazuje dokładne miejsce słupka */
.rj-pinwrap { background: none; border: 0; }
.rj-pin {
  position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 9px));
  display: inline-flex; align-items: center; min-width: 30px; max-width: 220px; padding: 4px 9px;
  font-family: var(--rj-sans); font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap;
  background: var(--rj-navy); color: #FFFFFF; border: 2px solid #FFFFFF; border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35); cursor: pointer;
}
.rj-pin__txt { overflow: hidden; text-overflow: ellipsis; }
.rj-pin::after {
  content: ""; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: var(--rj-navy); border-bottom: 0;
}
.rj-pin::before {
  content: ""; position: absolute; left: 50%; bottom: -15px; width: 8px; height: 8px; margin-left: -4px;
  background: var(--rj-navy); border: 2px solid #FFFFFF; border-radius: 50%;
}
.rj-pin--current { background: var(--rj-accent); font-size: 14px; padding: 5px 11px; }
.rj-pin--current::after { border-top-color: var(--rj-accent); }
.rj-pin--current::before { background: var(--rj-accent); }
.rj-pin--alt { opacity: .92; }

/* Dymek */
.rj-pop { min-width: 180px; }
.rj-pop__title { display: block; font-size: 15px; margin-bottom: 4px; color: var(--rj-ink); }
.rj-pop__row { font-size: 13px; color: var(--rj-soft); margin-top: 2px; }
.rj-pop__actions { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rj .rj-pop__btn {
  display: inline-flex; justify-content: center; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 600;
  background: var(--rj-navy); color: #FFFFFF !important; border: 0; border-radius: 4px; cursor: pointer; text-decoration: none;
}
.rj .rj-pop__btn:hover { background: var(--rj-navy-dark); text-decoration: none; }
.rj-pop__link { font-size: 13px; text-align: center; }

/* Legenda */
.rj-maplegend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 12px 20px 0 !important; font-size: 13px; color: var(--rj-ink-2); }
.rj-maplegend li { display: inline-flex; align-items: center; gap: 7px; margin:0; }
.rj-maplegend__dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #FFFFFF; box-shadow: 0 0 0 1px var(--rj-line); }
.rj-maplegend__dot--m { background: #D32A00; }
.rj-maplegend__dot--p { background: #1565C0; }
.rj-maplegend__dot--k { background: #1F7A3A; }
.rj-maplegend__pin { width: 16px; height: 12px; border-radius: 3px; background: var(--rj-navy); }
.rj-maplegend__pin--current { background: var(--rj-accent); }
.rj-maplegend__route { width: 22px; height: 5px; border-radius: 3px; background: var(--rj-navy); }

@media (max-width: 640px) {
  .rj-map, .rj-aside .rj-map { height: 320px; }
  .rj-maplegend { padding: 10px 16px 0 !important; }
  .rj-map__hint { padding: 8px 16px 12px!important; }
}
/* Strona działu pociągów: niższy nagłówek i stopka karty mapy, wyższa mapa (całe województwo) */
.rj--pociagi .rj-mapcard .rj-result__head { padding: 10px 20px; }
.rj--pociagi .rj-mapcard .rj-result__title { margin: 0 !important; font-size: 17px; line-height: 1.3; }
.rj--pociagi .rj-mapcard .rj-result__sub { margin: 2px 0 0 !important; font-size: 13px; line-height: 1.4; }
.rj--pociagi .rj-mapcard .rj-map { height: 640px; height: min(640px, 75vh); }
.rj--pociagi .rj-mapcard .rj-maplegend { padding: 8px 20px 0 !important; margin: 0 !important; }
.rj--pociagi .rj-mapcard .rj-map__hint { margin: 0 !important; padding: 4px 20px 8px !important; line-height: 1.4; }
@media (max-width: 640px) {
  .rj--pociagi .rj-mapcard .rj-result__head { padding: 8px 16px; }
  .rj--pociagi .rj-mapcard .rj-map { height: 480px; height: min(480px, 70vh); }
  .rj--pociagi .rj-mapcard .rj-maplegend { padding: 6px 16px 0 !important; }
  .rj--pociagi .rj-mapcard .rj-map__hint { padding: 4px 16px 8px !important; }
}
/* Zabezpieczenie przed globalnym img { max-width: 100% } z motywu serwisu – psuje kafelki mapy */
.rj .leaflet-container img { max-width: none !important; max-height: none !important; }

/* Pinezka autobusowa (v6) – kształt klasycznej pinezki + etykieta z numerem stanowiska */
.rj-mpin { background: none; border: 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.rj-mpin svg { display: block; }
.rj .rj-mpin__label {
  padding: 3px 8px; font-weight: 700; font-size: 13px; color: #FFFFFF;
  background: #12305A; border: 2px solid #FFFFFF; border-radius: 6px; box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.rj .rj-mpin__label::before { border-right-color: #12305A; }
.rj-maplegend__mpin { display: block; flex: none; width: 14px; height: 19px; }


.mpk-search-color{
  background: linear-gradient(180deg, rgb(238 217 203) 19%, rgb(248 249 251) 46%);
}

.kolej-search-color{
  background: linear-gradient(180deg, rgb(206, 238, 203) 19%, rgb(248 249 251) 46%);
}

/* ==========================================================================
   v7: jedna rodzina czcionek, strona główna (kafle, przewodnik, źródła danych),
   zmiany w rozkładach, przystanki w pobliżu, bilety MPK
   ========================================================================== */

/* Motyw serwisu ustawia własne kroje dla h1–h3 i p – w module rozkładów wszędzie IBM Plex */
.rj h1, .rj h2, .rj h3, .rj h4, .rj p, .rj li, .rj dt, .rj dd, .rj th, .rj td,
.rj summary, .rj label, .rj legend, .rj input, .rj select, .rj button, .rj caption { font-family: inherit; }
.rj a { text-decoration: none; }
.rj a:hover { text-decoration: underline; }
.rj-prose p a, .rj-guide p a, .rj-faq p a, .rj-data a, .rj-tickets p a { text-decoration: underline; }
.rj-nowrap { white-space: nowrap; }

/* ---------- Kafle działów ---------- */
.rj-hubcard__block { display: flex; flex-direction: column; gap: 10px; }
.rj-hubcard__sub { font-size: 15px; font-weight: 600; color: var(--rj-ink); }
.rj-hubcard__hint { font-size: 13px; color: var(--rj-soft); }

.rj-toplines { list-style: none; border-top: 1px solid var(--rj-line-soft); }
.rj-toplines li { margin: 0; }
.rj-toplines a {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--rj-line-soft); color: var(--rj-ink); text-decoration: none;
}
.rj-toplines a:hover { text-decoration: none; color: var(--rj-navy); }
.rj-toplines a:hover .rj-toplines__name { text-decoration: underline; }
.rj-toplines .rj-badge { min-width: 44px; }
.rj-toplines__name {
  font-size: 14px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rj-toplines__n { font-size: 13px; color: var(--rj-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }

.rj-places { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.rj-places li { margin: 0; }
.rj-places .rj-chip { color: var(--rj-ink); }
.rj-places .rj-chip:hover { color: var(--rj-navy); text-decoration: none; }

/* ---------- Strona działu pociągów: popularne połączenia i stacje (zamiast przykładowych odjazdów) ---------- */
.rj-popular__body { display: flex; flex-direction: column; gap: 24px; padding: 20px 28px 28px; }
.rj-popular__block { display: flex; flex-direction: column; gap: 10px; }
.rj-popular__sub { font-size: 16px; font-weight: 600; color: var(--rj-ink); margin: 0 !important; }
@media (max-width: 640px) {
  .rj-popular__body { padding: 16px; }
  .rj-popular .rj-places li:nth-child(n+9) { display: block; }
}

/* ---------- Zmiany w rozkładach ---------- */
.rj-changes { list-style: none; display: flex; flex-direction: column; }
.rj-changes__row { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--rj-line-soft); }
.rj-changes__row:first-child { padding-top: 0; }
.rj-changes__row:last-child { border-bottom: 0; padding-bottom: 0; }
.rj-changes__date { font-size: 15px; margin-bottom: 8px !important; }
.rj-changes__date .rj-muted { margin-left: 6px; }
.rj-changes .rj-tag { background: #FFF3DC; color: var(--rj-accent); border: 1px solid #F3D896; }
.rj-changes__lines { gap: 6px; }
.rj-changes__lines li { margin: 0; }
.rj-changes__lines .rj-badge { min-width: 40px; font-size: 14px; }
.rj-badge--nowa { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--rj-rail, #1F7A3A); }
.rj-badge--zawieszona { opacity: .55; text-decoration: line-through; }
.rj-changes__hint { margin-top: 12px !important; }

/* ---------- Przewodnik (dworce, lotnisko, nocne, święta, na żywo) ---------- */
.rj-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.rj-guide__item { padding: 24px 28px; }
.rj-guide__item p { color: var(--rj-ink-2); line-height: 1.65; }
.rj-guide__item p + p, .rj-guide__item ul + p, .rj-guide__item p + ul { margin-top: 12px !important; }
.rj-guide__title { font-size: 20px; font-weight: 700; color: var(--rj-navy); line-height: 1.3; margin-bottom: 14px !important; }
.rj-guide__lines { border-top: 1px solid var(--rj-line-soft); }
.rj-guide__lines li { margin: 0; }
.rj-guide__meta { display: block; font-size: 13px; color: var(--rj-soft); margin-top: 2px; }
.rj-guide .rj-atstop a:hover .rj-guide__meta { text-decoration: none; }

/* ---------- Źródła danych ---------- */
.rj-data { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: start; }
.rj-data__text p { color: var(--rj-ink-2); line-height: 1.65; margin-bottom: 12px; }
.rj-table--data tbody th { font-weight: 600; }
.rj-data__note { display: block; font-weight: 400; margin-top: 2px; }

/* ---------- Bilety MPK ---------- */
.rj-tickets { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.rj-table--tickets tbody th { font-weight: 400; font-size: 15px; }
.rj-table--tickets td { font-family: var(--rj-mono); font-size: 15px; white-space: nowrap; }
.rj-tickets__text .rj-h3:first-child { margin-top: 0 !important; }

/* ---------- Przystanki w pobliżu ---------- */
.rj-near { overflow: hidden; }
.rj-near .rj-result__head { flex-wrap: wrap; }
.rj-near__btn { align-self: center; gap: 8px; }
.rj-near__btn[disabled] { opacity: .6; cursor: progress; }
.rj-near__status { padding: 16px 28px 0 !important; font-size: 15px; color: var(--rj-ink-2); }
.rj-near__status.is-error { color: var(--rj-err-ink); }
.rj-near__list { list-style: none; padding: 8px 0 0 !important; }
.rj-near__item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px;
  margin: 0; padding: 12px 28px; border-bottom: 1px solid var(--rj-line-soft);
}
.rj-near__item:last-child { border-bottom: 0; }
.rj-near__name { font-weight: 600; font-size: 16px; color: var(--rj-navy); }
.rj-near__lines { grid-column: 1; font-size: 14px; color: var(--rj-soft); }
.rj-near__lines b { font-family: var(--rj-mono); font-weight: 600; color: var(--rj-ink-2); }
.rj-near__side { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.rj-near__dist { font-family: var(--rj-mono); font-weight: 600; font-size: 17px; color: var(--rj-ink); white-space: nowrap; }
.rj-near__walk { font-size: 13px; color: var(--rj-soft); white-space: nowrap; }
.rj-near__route { font-size: 13px; }
.rj-near__item:first-child .rj-near__dist { color: var(--rj-accent); }
.rj-near__note { padding: 12px 28px 16px !important; font-size: 13px; color: var(--rj-soft); border-top: 1px solid var(--rj-line-soft); background: var(--rj-surface-2); }
.rj-near-quick {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 0; border: 0; background: none;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--rj-navy); text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.rj-near-quick:hover { color: var(--rj-accent); }

@media (max-width: 1000px) {
  .rj-guide, .rj-data, .rj-tickets { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
  .rj-guide__item { padding: 18px 16px; }
  .rj-guide__title { font-size: 18px; }
  .rj-places li:nth-child(n+9) { display: none; }
  .rj-near__item { padding: 12px 16px; }
  .rj-near__status { padding: 14px 16px 0 !important; }
  .rj-near__note { padding: 10px 16px 14px !important; }
  .rj-near .rj-result__head { padding: 16px; }
  .rj-near__btn { align-self: stretch; width: 100%; }
}

/* ==========================================================================
   Wyszukiwarka połączeń (strona główna i /rozklady-jazdy/wyszukiwarka-polaczen/) (v7)
   ========================================================================== */
.rj-planner {
  margin-top: 24px; padding: 16px 20px 18px;
  background: #E8EBF0; border: 1px solid var(--rj-line-soft); border-radius: var(--rj-radius);
}
.rj-planner__trip { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 12px !important; }
.rj-radio, .rj-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; line-height: 1.3; }
.rj-radio input, .rj-check input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--rj-navy); cursor: pointer; }
.rj-radio input:not(:checked) + span { color: var(--rj-soft); }
.rj-check { font-size: 14px; }

.rj-planner__row { display: flex; align-items: flex-start; gap: 12px; }
.rj-planner__places { position: relative; display: flex; align-items: flex-start; flex: 2.4 1 0; min-width: 0; }
.rj-planner__place { position: relative; flex: 1 1 0; min-width: 0; }
.rj-planner__icon { position: absolute; z-index: 2; left: 13px; top: 13px; color: var(--rj-navy); pointer-events: none; }
.rj-planner__place + .rj-planner__swap + .rj-planner__place .rj-planner__icon { left: 28px; }
.rj-pi { display: none; }
.rj-planner__place[data-type="miasto"] .rj-pi--miasto,
.rj-planner__place[data-type="miejscowosc"] .rj-pi--miejscowosc,
.rj-planner__place[data-type="przystanek"] .rj-pi--przystanek,
.rj-planner__place[data-type="stacja"] .rj-pi--stacja,
.rj-planner__place[data-type=""] .rj-pi--none { display: block; }
.rj-planner__place[data-type=""] .rj-planner__icon { color: var(--rj-field); }

.rj-planner__input {
  width: 100%; height: 52px; padding: 0 22px 0 50px; font: inherit; font-size: 17px; color: var(--rj-ink);
  background: #FFFFFF; border: 1px solid var(--rj-line); border-radius: var(--rj-radius-s) 0 0 var(--rj-radius-s);
}
.rj-planner__place + .rj-planner__swap + .rj-planner__place .rj-planner__input { padding-left: 64px; border-left: 0; border-radius: 0 var(--rj-radius-s) var(--rj-radius-s) 0; }
.rj-planner__input::placeholder { color: #7A8699; }
.rj-planner__input:focus { position: relative; z-index: 1; border-color: var(--rj-navy); outline: 3px solid var(--rj-info-line); outline-offset: 0; }
.rj-planner__sub {
  display: block; margin-top: 6px; padding-left: 2px; font-size: 13px; line-height: 1.35; color: var(--rj-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rj-planner__place + .rj-planner__swap + .rj-planner__place .rj-planner__sub { padding-left: 16px; }
.rj-planner__swap {
  position: absolute; z-index: 3; left: 50%; top: 10px; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
  color: var(--rj-navy); background: #FFFFFF; border: 1.5px solid var(--rj-navy); border-radius: 50%; cursor: pointer;
}
.rj-planner__swap:hover { background: var(--rj-navy); color: #FFFFFF; }

.rj-planner__when {
  display: flex; align-items: center; gap: 8px; flex: 1.1 1 0; min-width: 250px; height: 52px; padding: 0 6px 0 12px !important;
  background: #FFFFFF; border: 1px solid var(--rj-line); border-radius: var(--rj-radius-s);
}
.rj-planner__cal { flex: none; color: var(--rj-soft); }
.rj-planner__date { position: relative; display: flex; align-items: center; flex: 1 1 auto; min-width: 0; height: 100%; }
.rj-planner__date input, .rj-planner__time input {
  height: 100%; min-width: 0; padding: 0 4px; font: inherit; font-size: 16px; color: var(--rj-ink); background: transparent; border: 0;
}
.rj-planner__date input { width: 100%; }
.rj-planner__date input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }
.rj-planner__datelabel { display: none; }
.rj-planner.is-js .rj-planner__date input { position: relative; z-index: 1; color: transparent; cursor: pointer; }
.rj-planner.is-js .rj-planner__date input::-webkit-datetime-edit { color: transparent; }
.rj-planner.is-js .rj-planner__date input:focus-visible { outline: none; }
.rj-planner.is-js .rj-planner__date:focus-within { outline: 3px solid var(--rj-focus); outline-offset: 2px; border-radius: 4px; }
.rj-planner.is-js .rj-planner__datelabel {
  display: block; position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  font-size: 16px; white-space: nowrap; pointer-events: none;
}
.rj-planner__time { display: flex; align-items: center; height: 60%; padding-left: 8px; border-left: 1px solid var(--rj-line); }
.rj-planner__time input { width: 98px; height: 52px; }
.rj-planner__time input:focus-visible, .rj-planner__date input:focus-visible { outline: 3px solid var(--rj-focus); outline-offset: -3px; border-radius: 4px; }

.rj-planner__opts { display: flex; flex-direction: column; gap: 6px; flex: none; padding-top: 3px; }
.rj-planner__go { flex: none; min-height: 52px; padding: 0 24px; gap: 10px; }
.rj-planner__go.is-busy { opacity: .75; cursor: progress; }
.rj-planner__return { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; }
.rj-planner__return .rj-planner__when { flex: 0 1 380px; }
.rj-planner__retlabel { font-weight: 600; }
.rj-planner__msg { margin-top: 12px !important; font-size: 15px; font-weight: 600; color: var(--rj-err-ink); }

/* Podpowiedzi z ikoną i opisem miejsca */
.rj-planner .rj-ac__list { min-width: min(360px, 88vw); max-height: min(460px, 60vh); }
.rj-ac__opt--rich { display: flex; align-items: center; gap: 12px; }
.rj-ac__txt { display: flex; flex-direction: column; min-width: 0; }
.rj-ac__sub { font-size: 13px; color: var(--rj-soft); }
.rj-ac__ico {
  flex: none; width: 22px; height: 22px; background-color: var(--rj-navy);
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.rj-ac__ico--miasto      { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V9l5-3v15M10 21V4l9 4v13M13 10h3M13 13h3M13 16h3'/%3E%3C/svg%3E"); }
.rj-ac__ico--miejscowosc { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V11l7-6 7 6v10M10 21v-5h4v5'/%3E%3C/svg%3E"); }
.rj-ac__ico--przystanek  { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6v6M15 6v6M2 12h19.6'/%3E%3Cpath d='M18 18h3s.5-1.7.8-2.8c.1-.4.2-.8.2-1.2 0-.4-.1-.8-.2-1.2l-1.4-5C20.1 6.8 19.1 6 18 6H4a2 2 0 0 0-2 2v10h3'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3Cpath d='M9 18h5'/%3E%3Ccircle cx='16' cy='18' r='2'/%3E%3C/svg%3E"); }
.rj-ac__ico--stacja      { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='3' width='12' height='13' rx='3'/%3E%3Cpath d='M6 9h12M9 21l1.5-5M15 21l-1.5-5'/%3E%3C/svg%3E"); background-color: var(--rj-rail, #1F7A3A); }

/* Wyszukiwarka połączeń na stronach działów (MPK / PKS / pociągi) (v8) */
.rj-planner__title { margin: 0 0 10px !important; font-size: 19px; font-weight: 700; line-height: 1.3; color: var(--rj-navy); }
.rj-planner--mpk     { border-left: 4px solid var(--rj-city); }
.rj-planner--pks     { border-left: 4px solid var(--rj-sub); }
.rj-planner--pociagi { border-left: 4px solid var(--rj-rail); }
/* Strona /trasa/{miejscowosc}/: zmiana dnia i godziny nad listą kursów */
.rj-panel--when { border-bottom: 1px solid var(--rj-line); }

/* Wyniki */
.rj-pagehead--planner .rj-planner { margin-top: 20px; }
/* Poprawione stanowiska (wybrane po złej stronie ulicy) (v14) */
.rj-adjust { padding: 14px 28px; background: #FFF7E8; border-bottom: 1px solid #F3D896; color: #5A3E00; font-size: 15px; line-height: 1.5; }
.rj-adjust p { margin: 0 0 6px !important; }
.rj-adjust ul { margin: 0 0 6px !important; padding-left: 20px !important; }
.rj-adjust li { margin: 2px 0; }
.rj-adjust a { font-weight: 600; }
@media (max-width: 640px) { .rj-adjust { padding: 12px 16px; } }
.rj-later { background: var(--rj-info-bg); border-bottom-color: var(--rj-info-line); color: var(--rj-ink); }
.rj-later p { margin: 0 !important; }
.rj-journey { overflow: hidden; }
.rj-journey .rj-result__head { flex-wrap: wrap; }
.rj-daynav { display: flex; flex-wrap: wrap; gap: 8px; }
.rj-conns { list-style: none; }
.rj-conn {
  display: grid; grid-template-columns: minmax(190px, 250px) minmax(0, 1fr); gap: 10px 28px;
  margin: 0; padding: 18px 28px; border-bottom: 1px solid var(--rj-line-soft);
}
.rj-conn:last-child { border-bottom: 0; }
.rj-conn__times { display: flex; align-items: center; gap: 10px; }
.rj-conn__times .rj-time { font-size: 22px; }
.rj-conn__dash { flex: none; width: 28px; height: 2px; background: var(--rj-line); }
.rj-conn--rail .rj-conn__dash { background: var(--rj-rail, #1F7A3A); }
.rj-conn__next { margin-left: 2px; font-family: var(--rj-sans); font-size: 11px; font-weight: 600; color: var(--rj-accent); vertical-align: super; }
.rj-conn__facts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px !important; font-size: 14px; color: var(--rj-soft); }
.rj-conn__chg--1 { color: var(--rj-accent); }
.rj-conn__in { font-weight: 600; color: var(--rj-ink-2); }
.rj-conn__legs { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.rj-conn__leg { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 12px; margin: 0; }
.rj-conn__leg .rj-badge { min-width: 48px; }
.rj-conn__legtxt { display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 1.4; }
.rj-time--sm { font-size: 15px; margin-right: 6px; }
.rj-conn__change { margin: 0; padding: 6px 10px; font-size: 14px; background: #FFF6E8; border-left: 3px solid var(--rj-accent); border-radius: 3px; }
.rj-journey__more { display: flex; justify-content: space-between; gap: 8px; padding: 14px 28px; background: var(--rj-surface-2); border-top: 1px solid var(--rj-line); }
.rj-journey__more .rj-btn:only-child { margin-left: auto; }
.rj-planner-miss p + .rj-places { margin: 10px 0 16px !important; }

@media (max-width: 1100px) {
  .rj-planner__row { flex-wrap: wrap; }
  .rj-planner__places { flex: 1 1 100%; }
  .rj-planner__when { flex: 1 1 280px; }
}
@media (max-width: 640px) {
  .rj-planner { padding: 14px; margin-left: -8px; margin-right: -8px; }
  .rj-planner__places { flex-direction: column; gap: 8px; }
  .rj-planner__place { width: 100%; }
  .rj-planner__input,
  .rj-planner__place + .rj-planner__swap + .rj-planner__place .rj-planner__input { padding: 0 52px 0 50px; border: 1px solid var(--rj-line); border-radius: var(--rj-radius-s); }
  .rj-planner__place + .rj-planner__swap + .rj-planner__place .rj-planner__icon { left: 13px; }
  .rj-planner__place + .rj-planner__swap + .rj-planner__place .rj-planner__sub { padding-left: 2px; }
  .rj-planner__swap { left: auto; right: 12px; top: 58px; transform: rotate(90deg); }
  .rj-planner__when { flex: 1 1 100%; min-width: 0; }
  .rj-planner__opts { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
  .rj-planner__go { flex: 1 1 100%; }
  .rj-planner__return .rj-planner__when { flex: 1 1 100%; }
  .rj-conn { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .rj-journey__more { padding: 12px 16px; }
  .rj-daynav { width: 100%; }
  .rj-daynav .rj-btn { flex: 1 1 0; }
}
/* ---------- Stacja: przełącznik Odjazdy / Przyjazdy ---------- */
.rj-result__head--mode { flex-wrap: wrap; }
.rj-modeswitch { flex: 0 0 auto; }
.rj-modeswitch a { min-width: 120px; justify-content: center; }
.rj-board__via { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--rj-soft); }
@media (max-width: 640px) {
  .rj-modeswitch { width: 100%; }
  .rj-modeswitch a { flex: 1 1 0; min-width: 0; }
}

/* ---------- Stacja: wyszukiwarka „Zaplanuj podróż z tej stacji” ---------- */
.rj-stop-planner { margin-top: 20px; }

/* ---------- Pociągi: „Często wyszukiwane połączenia” (lista jednokolumnowa, styl jak główne stacje) ---------- */
.rj-popconn { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.rj-popconn li { margin: 0; padding: 0; }
.rj-popconn__item {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; color: var(--rj-ink); text-decoration: none;
  border: 1px solid var(--rj-line); border-left: 4px solid var(--rj-rail); border-radius: var(--rj-radius-s);
}
.rj-popconn__item strong { font-size: 15px; color: var(--rj-navy); }
.rj-popconn__item > span { font-size: 13px; color: var(--rj-soft); }
.rj-popconn__item:hover { background: var(--rj-surface-2); border-color: var(--rj-navy); border-left-color: var(--rj-rail); text-decoration: none; }
.rj-popconn__item:focus-visible { outline: 2px solid var(--rj-focus); outline-offset: 2px; }

/* ---------- Wyszukiwarka: odcinek autobusowy w połączeniu kolejowym (ZKA, REGIObus) ---------- */
.rj-conn__bus { display: inline-block; width: fit-content; margin-top: 2px; padding: 1px 8px; font-size: 13px; font-weight: 600; color: #7A4B00; background: #FFF3DC; border: 1px solid #F3D896; border-radius: 3px; }

/* ---------- Strona główna: „7 linii” przy popularnych przystankach / stacjach / kierunkach ---------- */
.rj-hubcard__block .rj-chip__nr { font-family: inherit; white-space: nowrap; }

/* ---------- Wyszukiwarka: połączenie, które już odjechało (pierwsze na liście, wyszarzone) ---------- */
.rj-conn--past { background: var(--rj-surface-2); color: var(--rj-soft); }
.rj-conn--past .rj-time,
.rj-conn--past .rj-conn__legtxt { color: var(--rj-soft); }
.rj-conn--past .rj-badge { filter: grayscale(1); opacity: .6; }
.rj-conn__gone { width: fit-content; margin: 0 0 6px !important; padding: 2px 8px; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--rj-ink-soft, #3a3f46); background: var(--rj-line); border-radius: 3px; }

/* ---------- Przystanek: mały przełącznik Wszystkie / MPK / PKS (stanowiska obsługiwane przez oba działy) ---------- */
.rj-opswitch { flex: 0 0 auto; }
.rj-opswitch a { min-height: 34px; padding: 0 12px; font-size: 14px; }
@media (max-width: 640px) {
  .rj-opswitch { width: fit-content; }
  .rj-opswitch a { flex: 0 0 auto; padding: 0 12px; font-size: 14px; }
}

/* ---------- Linia MPK: tabela kursów w tygodniu i lista przystanków obu kierunków ---------- */
.rj-linefacts th[scope="row"] { font-weight: 600; min-width: 180px; }
.rj-linefacts td, .rj-linefacts th { border-bottom: 1px solid var(--rj-line-soft); white-space: nowrap; }
.rj-linefacts th[scope="row"] { white-space: normal; }
.rj-linestops { margin-top: 8px; }
.rj-linestops ol { margin: 12px 0 0; padding-left: 28px; columns: 2 260px; column-gap: 32px; }
.rj-linestops li { margin: 0 0 4px; break-inside: avoid; font-size: 15px; }

/* ---------- Przystanek linii: inne linie z tego samego stanowiska ---------- */
.rj-atstop--inline { list-style: none; margin: 8px 0 16px !important; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.rj-atstop--inline li { margin: 0; }
.rj-atstop--inline a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }

/* ---------- Stacja: informacje praktyczne i kierunki pociągów ---------- */
.rj-stinfo { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 8px 20px; margin: 0; }
.rj-stinfo div { display: contents; }
.rj-stinfo dt { font-weight: 600; color: var(--rj-ink); }
.rj-stinfo dd { margin: 0; color: var(--rj-ink-2); }
.rj-stdest { list-style: none; margin: 0 !important; padding: 0 !important; columns: 2 280px; column-gap: 32px; }
.rj-stdest li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--rj-line-soft); break-inside: avoid; }
.rj-stdest strong { white-space: nowrap; color: var(--rj-navy); }
.rj-atstop--inline a { padding: 0; border-bottom: 0; }

/* ---------- Linia: warianty trasy (przystanki tylko na części kursów) ---------- */
.rj-route li.is-variant::after { background: none; border-left: 2px dashed var(--rj-field); width: 0; }
.rj-route li.is-variant::before { background: var(--rj-surface); border-style: dashed; }
.rj-route li.is-variant a { color: var(--rj-soft); }
.rj-route__var { display: block; font-size: 12px; font-weight: 500; color: var(--rj-accent); line-height: 1.3; }
.rj-route__var--skip { color: var(--rj-soft); }
.rj-variants { list-style: none; margin: 8px 0 14px !important; padding: 0 !important; display: grid; gap: 6px; }
.rj-variants li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; color: var(--rj-ink-2); margin: 0; }
.rj-variants__l { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 4px; background: var(--rj-info-bg); color: var(--rj-navy); font-weight: 700; font-size: 12px; }
.rj-variants--route { margin: 12px 16px 4px !important; }
.rj-maplegend__route--dash { background: none !important; border-top: 3px dashed; height: 0 !important; }

/* ---------- Legenda mapy linii: przystanki na trasie / tylko część kursów / pozostałe ---------- */
.rj-maplegend__dot { flex: none; box-sizing: border-box; }
.rj-maplegend__dot--lg { width: 14px; height: 14px; }
.rj-maplegend__dot--sm { width: 9px; height: 9px; border-width: 1px; opacity: .55; }
.rj-maplegend__ring { flex: none; box-sizing: border-box; width: 13px; height: 13px; border-radius: 50%; background: #FFFFFF; border: 3px solid #D32A00; }
.rj-maplegend__ring--m { border-color: #D32A00; }
.rj-maplegend__ring--p { border-color: #1565C0; }
.rj-maplegend__ring--k { border-color: #1F7A3A; }
.rj-maplegend__route { flex: none; }
.rj-maplegend__route--dash { border-top-width: 4px !important; width: 26px; filter: drop-shadow(0 0 1px #fff); }

/* ---------- Linia: szybka zmiana linii w nagłówku ---------- */
.rj-lineswitch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 18px; max-width: 560px; }
.rj-lineswitch .rj-label { margin: 0; white-space: nowrap; }
.rj-lineswitch .rj-select { flex: 1 1 260px; min-width: 0; width: auto; min-height: 44px; }
@media (max-width: 640px) {
  .rj-lineswitch { max-width: none; }
  .rj-lineswitch .rj-select { flex-basis: 100%; }
}

/* ---------- Legenda mapy: warianty trasy – wyraźnie przerywana próbka (kreski jak na mapie) ---------- */
.rj-maplegend__dash {
  flex: none; display: inline-block; width: 30px; height: 4px; border: 0; border-radius: 0;
  background: repeating-linear-gradient(90deg, currentColor 0 7px, transparent 7px 11px);
}

/* ---------- Przystanek: tablice rozkładów (okno z tabliczkami linii) ---------- */
.rj-boards-open { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 16px 0 0; }
.rj-dlg--boards { width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 32px); }
.rj-boards { padding: 12px 24px 20px; }
.rj-boards__nav { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 12px; background: var(--rj-surface); }
.rj-boards__nav a { text-decoration: none; }
.rj-board { margin: 0 0 28px; scroll-margin-top: 60px; }
.rj-board__head { display: flex; align-items: center; gap: 14px; margin: 0 0 10px; }
.rj-board__title { margin: 0 !important; font-size: 18px; font-weight: 700; color: var(--rj-navy); line-height: 1.3; }
.rj-board__table { width: 100%; border-collapse: collapse; font-family: var(--rj-mono); font-size: 15px; border: 1px solid var(--rj-line); }
.rj-board__table thead th { background: var(--rj-navy); color: #FFFFFF; font-family: var(--rj-sans); font-size: 13px; font-weight: 600; text-align: left; padding: 8px 10px; }
.rj-board__table th, .rj-board__table td { border: 1px solid var(--rj-line-soft); padding: 5px 10px; vertical-align: top; }
.rj-board__table tbody tr:nth-child(even) td, .rj-board__table tbody tr:nth-child(even) th { background: var(--rj-surface-2); }
.rj-board__h { width: 56px; text-align: center !important; font-weight: 700; color: var(--rj-navy); }
.rj-board__table thead .rj-board__h { color: #FFFFFF; }
.rj-board__m { display: inline-block; min-width: 2.6em; }
.rj-board__m sup { font-size: 10px; color: var(--rj-accent); font-weight: 700; margin-left: 1px; }
.rj-board__none { display: block; font-weight: 400; font-size: 12px; opacity: .8; }
.rj-board__marks { list-style: none; margin: 8px 0 0 !important; padding: 0 !important; display: grid; gap: 4px; font-size: 13px; color: var(--rj-ink-2); }
.rj-board__marks strong { color: var(--rj-accent); margin-right: 4px; }
.rj-boards__note { margin-top: 8px; }
@media (max-width: 640px) {
  .rj-boards { padding: 10px 12px 16px; }
  .rj-board__table { font-size: 13px; }
  .rj-board__table th, .rj-board__table td { padding: 4px 6px; }
  .rj-board__m { min-width: 2.3em; }
}
.rj-boards__nav { position: static; }
.rj-board { scroll-margin-top: 90px; }

/* ---------- Przystanek: tablice rozkładów na stronie (zamiast tablicy odjazdów z wyborem dnia i godziny) ---------- */
.rj-result.rj-boards { padding: 0; }
.rj-boards__body { padding: 16px 28px 20px; }
.rj-boards__body .rj-boards__nav { padding: 0 0 14px; }
@media (max-width: 640px) {
  .rj-boards__body { padding: 12px 12px 16px; }
}

/* ---------- Przystanek: rozkład linii w pasach dni (jak na tabliczce) ---------- */
.rj-board__day { margin: 0 0 6px; }
.rj-board__band {
  margin: 0 !important; padding: 5px 12px; border-radius: 4px; text-align: center;
  font-size: 14px; font-weight: 700; line-height: 1.3;
}
.rj-board__day--robocze .rj-board__band { background: #E4E6EA; color: #3A3F46; }
.rj-board__day--sobota  .rj-board__band { background: #4E8A3E; color: #FFFFFF; }
.rj-board__day--swieta  .rj-board__band { background: #C7373A; color: #FFFFFF; }
.rj-board__times {
  list-style: none; margin: 0 !important; padding: 8px 4px 10px !important;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px 4px;
}
.rj-board__times li {
  margin: 0; padding: 2px 0; text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--rj-ink);
}
.rj-board__times sup { font-size: 10px; font-weight: 700; color: var(--rj-accent); margin-left: 1px; }
.rj-board__times li.is-next { background: #1F7A3A; color: #FFFFFF; border-radius: 4px; font-weight: 700; }
.rj-board__times li.is-next sup { color: #FFFFFF; }
.rj-board__none { margin: 8px 12px 12px !important; font-size: 14px; color: var(--rj-soft); display: block; }
.rj-board { padding-bottom: 8px; border-bottom: 1px solid var(--rj-line-soft); }
.rj-board:last-of-type { border-bottom: 0; }
@media (max-width: 640px) {
  .rj-board__times { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); }
  .rj-board__times li { font-size: 14px; }
}

/* ---------- Przystanek: każda linia w osobnej ramce; soboty na niebiesko ---------- */
.rj-board {
  margin: 0 0 16px; padding: 14px 16px 10px;
  border: 1px solid var(--rj-line); border-left: 4px solid var(--rj-navy); border-radius: var(--rj-radius);
  background: var(--rj-surface);
}
.rj-board:last-of-type { border-bottom: 1px solid var(--rj-line); }
.rj-board__head { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--rj-line-soft); }
.rj-board__day--sobota .rj-board__band { background: #2F6DB5; color: #FFFFFF; }
@media (max-width: 640px) {
  .rj-board { padding: 12px 10px 8px; }
}

/* ---------- Przystanek: legenda wariantów pod rozkładem linii – zwarta ---------- */
.rj-board__marks { gap: 2px !important; margin: 6px 0 4px !important; }
.rj-board__marks li { margin: 0 !important; padding: 0 !important; line-height: 1.4 !important; font-size: 13px; }
.rj-board__marks li::before { content: none !important; }

/* ---------- Przystanek: wybór stanowiska w nagłówku (zamiast listy „Sprawdź odjazdy z innych przystanków”) ---------- */
.rj-meta__pick dd { font-weight: 400; }
.rj-postsel { min-height: 38px; padding-top: 4px; padding-bottom: 4px; font-size: 14px; font-weight: 600; max-width: 420px; width: 100%; }
@media (max-width: 640px) {
  .rj-meta__pick { flex: 1 1 100%; }
  .rj-postsel { max-width: none; }
}

/* ---------- Przystanek: pole „Przystanek” z podpowiedziami w nagłówku ---------- */
.rj-meta__pick { min-width: 300px; }
.rj-stopchange { margin: 4px 0 0; }
.rj-stopchange .rj-input { width: 100%; min-width: 280px; max-width: 420px; min-height: 40px; padding-top: 6px; padding-bottom: 6px; font-size: 15px; font-weight: 600; }
.rj-stopchange .rj-ac__list { z-index: 20; min-width: 320px; }
@media (max-width: 640px) {
  .rj-meta__pick { min-width: 0; flex: 1 1 100%; }
  .rj-stopchange .rj-input { min-width: 0; max-width: none; }
}

/* ---------- Przystanek: ramka linii bez niebieskiego paska; numer linii zawsze w jednym wierszu ---------- */
.rj-board { border-left: 1px solid var(--rj-line); }
.rj-board__head .rj-badge { flex: none; width: auto; min-width: 56px; padding-left: 10px; padding-right: 10px; white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
.rj-boards__nav .rj-badge { white-space: nowrap; }

/* ---------- Przystanek: filtr linii nad rozkładem („Linie: Wszystkie 51 200”) ---------- */
.rj-boards__nav { align-items: center; gap: 8px; }
.rj-boards__label { font-size: 14px; font-weight: 600; color: var(--rj-ink-2); margin-right: 2px; }
.rj-boards__nav a { display: inline-flex; align-items: center; border-radius: 6px; outline-offset: 2px; }
.rj-boards__all {
  padding: 5px 12px; font-size: 14px; font-weight: 600; color: var(--rj-navy) !important;
  border: 1.5px solid var(--rj-field); background: var(--rj-surface);
}
.rj-boards__all[aria-current] { background: var(--rj-navy); border-color: var(--rj-navy); color: #FFFFFF !important; }
.rj-boards__nav a[data-board-filter]:not(.rj-boards__all)[aria-current] { box-shadow: 0 0 0 2px var(--rj-surface), 0 0 0 4px var(--rj-navy); }
.rj-board[hidden] { display: none; }
.rj-stopchange .rj-input { max-width: 520px; }

/* ---------- Przystanek: szersze pole „Przystanek” w nagłówku ---------- */
.rj-meta:has(.rj-meta__pick) { width: 100%; max-width: 760px; }
.rj-meta__pick { flex: 1 1 auto; min-width: min(560px, 100%); }
.rj-meta__pick dd, .rj-stopchange, .rj-stopchange .rj-ac { width: 100%; }
.rj-stopchange .rj-input { width: 100%; min-width: 0; max-width: none; min-height: 46px; padding-left: 14px; padding-right: 40px; font-size: 16px; }
@media (max-width: 640px) {
  .rj-meta__pick { min-width: 0; flex: 1 1 100%; }
}

/* ---------- Linia: tabliczka z trzema rodzajami dni obok siebie ---------- */
.rj-hours--days { min-width: 560px; table-layout: fixed; }
.rj-hours--days thead tr { border-top: 0; background: none !important; }
.rj-hours--days thead th {
  padding: 8px 10px; font-size: 13px; font-weight: 700; text-align: center; color: #FFFFFF; line-height: 1.3;
}
.rj-hours--days thead th small { display: block; font-size: 11px; font-weight: 500; opacity: .9; }
.rj-hours--days .rj-hours__h { width: 64px; background: var(--rj-navy); }
.rj-hours__day--robocze { background: #5B6573; }
.rj-hours__day--sobota  { background: #2F6DB5; }
.rj-hours__day--swieta  { background: #C7373A; }
.rj-hours--days tbody th { width: 64px; }
.rj-hours--days td { padding: 8px 10px; vertical-align: top; border-left: 1px solid var(--rj-line-soft); }
.rj-hours--days td.is-today { background: rgba(47, 111, 237, .05); }
.rj-hours--days .rj-hours__mins { gap: 4px; }
@media (max-width: 640px) {
  .rj-hours--days { min-width: 480px; }
  .rj-hours--days td { padding: 6px 4px; }
  .rj-hours--days .rj-hours__h, .rj-hours--days tbody th { width: 44px; }
}
.rj-hours--days tbody th { padding: 8px 0; text-align: center; font-size: 18px; line-height: 34px; }
@media (max-width: 640px) { .rj-hours--days tbody th { font-size: 15px; } }

/* ---------- Linia: uproszczona góra strony ---------- */
/* Nagłówek: numer + H1, „Zmień linię” po prawej */
.rj-linehead--compact { flex-wrap: nowrap; align-items: center; margin-bottom: 0; }
.rj-linehead--compact .rj-h1 { flex: 1 1 auto; min-width: 0; }
.rj-lineswitch--compact { flex: 0 0 auto; margin: 0 0 0 auto; max-width: 280px; }
.rj-lineswitch--compact .rj-select { min-height: 40px; font-size: 14px; flex-basis: auto; width: 260px; }
.rj-pagehead { padding-bottom: 20px; }

/* Pasek wyboru: kierunek i przystanek w jednym wierszu */
.rj-lp__controls--row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; gap: 12px 20px; padding: 16px 20px; }
.rj-lp__controls--row .rj-field { margin: 0; }
.rj-lp__pick--row { padding: 0; border-bottom: 0; gap: 6px; }
.rj-lp__pick--row .rj-select { min-height: 44px; }
.rj-dirseg { display: flex; border: 1.5px solid var(--rj-field); border-radius: var(--rj-radius-s); overflow: hidden; }
.rj-dirseg a {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; min-height: 44px; padding: 6px 14px;
  font-size: 15px; font-weight: 600; line-height: 1.25; color: var(--rj-ink); text-decoration: none; background: var(--rj-surface);
}
.rj-dirseg a + a { border-left: 1px solid var(--rj-line); }
.rj-dirseg a::before { content: "→"; margin-right: 8px; opacity: .6; }
.rj-dirseg a:hover { background: var(--rj-surface-2); color: var(--rj-navy); text-decoration: none; }
.rj-dirseg a[aria-current] { background: var(--rj-navy); color: #FFFFFF; }
.rj-dirseg a[aria-current]::before { opacity: .9; }

/* Nad tabliczką: najbliższe odjazdy i link do przystanku w jednym pasku */
.rj-next--bar { padding: 12px 20px; }
.rj-next__all { margin-left: auto; font-size: 14px; font-weight: 600; white-space: nowrap; }

@media (max-width: 800px) {
  .rj-linehead--compact { flex-wrap: wrap; }
  .rj-lineswitch--compact { margin: 6px 0 0; max-width: none; flex: 1 1 100%; }
  .rj-lineswitch--compact .rj-select { width: 100%; }
  .rj-lp__controls--row { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .rj-dirseg a { font-size: 14px; padding: 6px 10px; }
  .rj-next__all { margin-left: 0; flex-basis: 100%; }
}

/* ---------- Strona rodzaju pociągu (REG, IC, TLK…) ---------- */
.rj-railcat__rel { list-style: none; margin: 0 !important; padding: 0 !important; columns: 2 300px; column-gap: 28px; }
.rj-railcat__rel li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rj-line-soft); break-inside: avoid; font-size: 15px; margin: 0; }
.rj-railcat__rel a { font-weight: 600; }
.rj-railcat__rel .rj-muted { white-space: nowrap; font-size: 13px; }
.rj-railcat__st { list-style: none; margin: 0 !important; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; }
.rj-railcat__st li { margin: 0; }
.rj-railcat__cats { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; gap: 8px; }
.rj-railcat__cats li { margin: 0; }
.rj-railcat__cats a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.rj-railcat .rj-box { padding: 20px 24px; margin-bottom: 16px; }

/* ---------- Pociągi: wyszukiwarka stacji bez zakładek ---------- */
.rj-tabs[hidden] { display: none !important; }

/* ---------- „Przystanki / stacje w pobliżu” tylko na telefonach i tabletach (ekran dotykowy) ---------- */
@media (hover: hover) and (pointer: fine) {
  .rj-near, .rj-near-quick { display: none !important; }
}

/* ---------- Pociągi: „Często wyszukiwane połączenia” w kolumnie głównej – dwie kolumny ---------- */
.rj-main .rj-popconn { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rj-main .rj-box:has(.rj-popconn) { padding: 20px 24px; margin-bottom: 16px; }
