/* JECHAĆ.PL / KOLEJ — train detail preview 2026-11-04
   Extends shared home-v13.css; does not fork the global header/footer. */
.detail-error{padding:25px 0 65px}
.detail-error>a{font-weight:850;font-size:12px;color:#3177a5}
.detail-error-card{margin:15px 0;padding:25px}
.detail-error-card h1{color:var(--navy)}
.detail-error-card p{color:#748c9e}
.detail-hero{background:linear-gradient(180deg,#eef5fa 0%,#e7f1f8 100%);border-bottom:1px solid #d9e6f0}
.detail-hero .container{padding-bottom:23px}
.detail-breadcrumb{display:flex;align-items:center;gap:10px;padding:16px 0 12px;font-size:11px;color:#8b9bab}
.detail-breadcrumb a{color:#5b819d}
.detail-breadcrumb strong{color:#466e8c;font-weight:850}
.detail-example{display:inline-flex;margin:0 0 9px;padding:5px 9px;background:#fff8e9;border:1px solid #e4d4b9;border-radius:6px;color:#9b7843;font-size:10px;font-weight:800}
.detail-titlebar{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:16px}
.detail-titlebar>div:first-child{min-width:0}
.detail-titlebar h1{color:#173d5b;font-weight:900;font-size:clamp(30px,3.3vw,43px);letter-spacing:-1.5px;line-height:1.16;margin:6px 0 7px}
.detail-titlebar h1>span:last-child{color:#3476aa;font-weight:830}
.detail-titlebar .train-code{color:#153b58;font-size:.68em;vertical-align:4px;font-weight:920;letter-spacing:-.6px}
.detail-titlebar p{color:#667f93;margin:0;font-size:12px;line-height:1.4}
.detail-titlebar p i{font-style:normal;margin:0 8px;color:#a9bbcb}
.detail-actions{display:flex;align-items:flex-end;flex-direction:column;gap:9px;flex:none}
.detail-actions>a{font-size:11px;color:#326d95;font-weight:820}
.train-status{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;color:#49728b;background:#fff;border:1px solid #cddfe9;border-radius:8px;font-weight:840;font-size:12px;white-space:nowrap}
.train-status i{background:#7898b2;border-radius:50%;width:8px;height:8px;display:inline-block}
.train-status.status-running{background:#eaf6f0;color:#2e755f;border-color:#bddfcf}
.train-status.status-running i{background:#3b9b7d}
.train-status.status-cancelled{background:#fff0ed;color:#a95353;border-color:#ead0cb}
.train-status.status-cancelled i{background:#d27068}
.journey{display:grid;grid-template-columns:minmax(0,1fr) 235px minmax(0,1fr);align-items:center;gap:13px;border:1px solid #d0e0ec;background:#fff;border-radius:11px;padding:18px 24px;margin-bottom:13px;box-shadow:0 6px 18px rgba(20,61,93,.055)}
.journey-terminal{min-width:0;display:flex;flex-direction:column}
.journey-terminal>small{font-size:9px;color:#66879d;letter-spacing:1px;font-weight:870}
.journey-terminal>strong{font-size:24px;letter-spacing:-.7px;color:#1d4a6b;line-height:1.18;margin:5px 0 10px;font-weight:900;min-width:0}
.journey-terminal>span{font-size:11px;color:#8195a4}
.journey-terminal>span b{font-size:22px;color:#286d9b;margin-right:8px}
.journey-terminal.final{text-align:right;align-items:flex-end}
.journey-connection{display:flex;flex-direction:column;align-items:center;text-align:center;color:#6e8698;font-size:10px;gap:3px}
.journey-connection>div{display:flex;align-items:center;width:100%;gap:0;margin-bottom:9px}
.journey-connection>div i{border-radius:50%;border:2px solid #4487b7;width:11px;height:11px;flex:none}
.journey-connection>div i:last-child{background:#4487b7}
.journey-connection>div span{height:2px;width:100%;background:linear-gradient(90deg,#5f9fc6,#c5dbe8)}
.journey-connection strong{font-size:14px;color:#365f7a}
.detail-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.detail-kpis>div{border:1px solid #d8e5ef;background:#fff;border-radius:9px;padding:12px 14px;display:flex;flex-direction:column;min-height:92px}
.detail-kpis span{font-size:10px;font-weight:800;color:#7b94a6}
.detail-kpis strong{font-size:17px;line-height:1.24;color:#235674;letter-spacing:-.4px;margin:6px 0 4px;font-weight:880;overflow-wrap:anywhere}
.detail-kpis small{font-size:10px;color:#8d9fae;line-height:1.35}
.delay-early{color:#258c72!important}
.delay-minor{color:#bf8051!important}
.delay-moderate,.delay-late{color:#c25b51!important}
.detail-body{padding-top:18px;padding-bottom:34px}
.detail-tabs{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:15px}
.detail-tabs>a{padding:9px 13px;border:1px solid #d6e4ee;border-radius:7px;background:#fff;color:#406d8b;font-weight:820;font-size:11px}
.detail-tabs>a:hover{background:#edf5fb;border-color:#b5d1e3}
.detail-columns{display:grid;grid-template-columns:minmax(0,1.19fr) minmax(340px,.81fr);align-items:start;gap:15px}
.detail-columns .panel-heading{min-height:96px;padding:19px 20px 16px}
.detail-columns .panel-heading h2{color:#214b6a;font-size:21px;letter-spacing:-.6px;line-height:1.15;margin:5px 0}
.detail-columns .panel-heading p{font-size:11px;color:#7892a6;margin:0}
.route-card{min-width:0;overflow:hidden}
.count-chip{border-radius:7px;border:1px solid #d8e9f3;padding:7px 10px;color:#37769c;font-size:10px;font-weight:850;white-space:nowrap}
.route-legend{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;padding:12px 19px;font-size:10px;font-weight:760;color:#6a8496}
.route-legend span{display:flex;align-items:center;gap:6px}
.bead{border-radius:50%;display:block;flex:none;width:9px;height:9px;background:#e5edf2;border:2px solid #a0b6c6}
.bead.confirmed{border-color:#4b9d88;background:#4b9d88}
.bead.forecast{border-color:#d1a961;background:#fff4db}
.bead.pending{border-color:#b2c3d0;background:#fff}
.route-columns{display:grid;grid-template-columns:minmax(0,1fr) 64px 64px 85px;gap:5px;padding:10px 17px 10px 29px;background:#f5f9fc;border-top:1px solid #eaf0f5;border-bottom:1px solid #e4edf3;color:#8397a7;text-transform:uppercase;font-weight:850;letter-spacing:.35px;font-size:9px}
.route-columns span:not(:first-child){text-align:center}
.route-stops{position:relative}
.route-stops:before{content:"";position:absolute;left:23px;top:31px;bottom:31px;width:2px;background:#d7e5ef}
.route-stop{position:relative;width:100%;padding:10px 15px;min-height:68px;display:grid;grid-template-columns:minmax(0,1fr) 64px 64px 85px;gap:5px;align-items:center;border:0;border-bottom:1px solid #edf2f6;background:#fff;text-align:left;color:var(--ink);font:inherit;cursor:pointer}
.route-stop:last-child{border-bottom:0}
.route-stop:hover{background:#f6fafd}
.route-stop.is-selected{background:#edf7fb;box-shadow:inset 4px 0 #3984b5}
.stop-name{display:flex;align-items:center;gap:15px;min-width:0}
.stop-name .bead{position:relative;z-index:1;width:14px;height:14px}
.stop-confirmed .bead{background:#49a18a;border-color:#49a18a;box-shadow:0 0 0 3px #e8f5f0}
.stop-forecast .bead{background:#fff2d8;border-color:#d7ac66}
.stop-pending .bead{background:#fff;border-color:#a9bdcb}
.stop-cancelled .bead{background:#ecc9c8;border-color:#d47b78}
.stop-name>span{min-width:0}
.stop-name strong{display:block;color:#264f6d;font-size:12px;font-weight:850;line-height:1.3;overflow-wrap:anywhere}
.stop-name small{display:block;color:#91a1ae;font-size:10px;line-height:1.35;margin-top:3px}
.time-cell{display:flex;flex-direction:column;align-items:center;gap:2px;justify-content:center}
.time-cell b{font-size:12px;letter-spacing:-.25px;font-weight:850;color:#355e7c}
.time-cell small{font-size:10px;color:#8798a6;white-space:nowrap}
.time-cell small.actual{color:#2d8a70;font-weight:820}
.time-cell small.forecast{color:#b48c46;font-weight:770}
.stop-delay{text-align:center;white-space:nowrap}
.delay-tag{display:inline-block;min-width:58px;padding:5px 7px;border-radius:6px;color:#667f91;background:#eff4f7;font-size:10px;font-weight:850}
.delay-tag.delay-early{background:#e7f5ed;color:#21816b!important}
.delay-tag.delay-on-time{background:#e7f5ed;color:#21816b!important}
.delay-tag.delay-minor{background:#fff5e8;color:#a77832!important}
.delay-tag.delay-moderate,.delay-tag.delay-late{background:#fff0eb;color:#b6594a!important}
.stop-delay>small{color:#9aabba}
.route-footer{background:#f8fafc;border-top:1px solid #e4edf3;padding:14px 17px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.route-footer>span{color:#8095a6;font-size:10px;max-width:360px;line-height:1.45}
.route-footer button{border:1px solid #d0e4f2;border-radius:6px;background:#fff;color:#36749a;font-size:10px;font-weight:850;padding:8px 9px;cursor:pointer}
.route-footer button:disabled{opacity:.5;cursor:default}
.detail-aside{display:grid;gap:15px;min-width:0}
.route-map-wrap{padding:13px 14px 5px}
.route-map{width:100%;height:auto;display:block;border-radius:9px}
.route-segment{stroke:#7ba0b9;stroke-width:3.6;stroke-linecap:round;opacity:.72}
.route-segment.travelled{stroke:#3a9e87;opacity:.92}
.map-stop circle{stroke:#fff;stroke-width:2;fill:#5d9abe}
.map-stop.endpoint circle{fill:#1d688d;stroke-width:2.7}
.map-stop.current circle{fill:#dc9c56;stroke:#fff;stroke-width:3}
.map-stop.is-selected circle{fill:#e28e37;stroke:#fff;stroke-width:4;filter:drop-shadow(0 0 5px rgba(214,142,44,.45))}
.map-label{font-size:13px;fill:#2a5b7a;font-weight:840}
.map-focus{margin:0 16px 0;border:1px solid #dbe9f1;border-radius:7px;background:#f7fafc;padding:10px 12px;display:flex;flex-direction:column}
.map-focus b{font-size:13px;color:#235879}
.map-focus span{color:#8b9eab;font-size:10px;margin-top:3px}
.map-caution{padding:11px 16px 14px;font-size:10px;color:#8ca0af;line-height:1.55;margin:0}
.map-caution strong{color:#68849b}
.map-empty{padding:25px 16px;color:#7b91a1;font-size:12px}
.train-delay-chart{padding:11px 15px 5px}
.train-delay-chart svg{width:100%;display:block;height:auto}
.train-delay-chart text{font-size:11px;fill:#7691a6}
.zero-line{stroke:#a9c0cf;stroke-width:1.6;stroke-dasharray:5 4}
.delay-profile{fill:none;stroke:#3d8aaa;stroke-width:3.6;stroke-linecap:round;stroke-linejoin:round}
.delay-plot-point circle{fill:#2d8ba6;stroke:#fff;stroke-width:2}
.chart-foot{margin:0;padding:5px 17px 16px;font-size:10px;color:#8499a8}
.alert-list{padding:6px 15px}
.alert-message{padding:14px 0;border-bottom:1px solid #e5edf3}
.alert-message:last-child{border-bottom:0}
.alert-message strong{display:block;color:#855b34;font-size:13px}
.alert-message p{font-size:12px;line-height:1.55;color:#4b6476;margin:5px 0}
.alert-message small{font-size:10px;color:#8595a3}
.alerts-foot{font-size:10px;color:#899baa;padding:11px 16px 16px;border-top:1px solid #e6eef4;line-height:1.4}
.detail-bottom{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:18px;font-size:11px;color:#8b9eae}
.detail-bottom a{font-weight:850;color:#34759e}
@media(max-width:1120px){
 .journey{grid-template-columns:minmax(0,1fr) 165px minmax(0,1fr)}
 .detail-columns{grid-template-columns:minmax(0,1fr) minmax(315px,.79fr);gap:11px}
 .route-columns,.route-stop{grid-template-columns:minmax(0,1fr) 57px 57px 72px;gap:3px}
 .route-stop{padding-inline:11px}
 .route-stops:before{left:19px}
 .stop-name{gap:10px}
 .journey-terminal strong{font-size:22px}
}
@media(max-width:910px){
 .detail-columns{grid-template-columns:1fr}
 .detail-aside{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
 .alerts-card{grid-column:1/-1}
 .detail-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
 .detail-breadcrumb{padding:13px 0 10px}
 .detail-titlebar{display:block}
 .detail-titlebar h1{font-size:31px}
 .detail-titlebar p{font-size:11px}
 .detail-actions{flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:13px}
 .journey{grid-template-columns:1fr 1fr;gap:9px;padding:14px 12px}
 .journey-connection{grid-column:1/-1;grid-row:2;padding-top:3px}
 .journey-terminal>strong{font-size:16px;line-height:1.2;min-height:39px}
 .journey-terminal>small{font-size:8px}
 .journey-terminal>span{font-size:9px}
 .journey-terminal>span b{font-size:17px;margin-right:5px}
 .detail-kpis{gap:7px}
 .detail-kpis>div{padding:10px;min-height:88px}
 .detail-kpis strong{font-size:14px}
 .detail-kpis span,.detail-kpis small{font-size:9px}
 .detail-tabs{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;gap:5px}
 .detail-tabs>a{white-space:nowrap;font-size:10px;padding:8px 10px}
 .detail-aside{grid-template-columns:1fr}
 .detail-columns .panel-heading{padding:15px 13px;min-height:0}
 .detail-columns .panel-heading h2{font-size:18px}
 .detail-columns .panel-heading p{font-size:10px}
 .route-columns,.route-stop{grid-template-columns:minmax(0,1fr) 44px 44px 55px;gap:2px}
 .route-columns{padding:9px 8px 9px 20px;font-size:8px}
 .route-stop{padding:9px 7px;min-height:61px}
 .route-stops:before{left:14px}
 .stop-name{gap:7px}
 .stop-name .bead{width:13px;height:13px}
 .stop-name strong{font-size:11px}
 .stop-name small{font-size:9px}
 .time-cell b{font-size:10px}
 .time-cell small{font-size:9px}
 .delay-tag{font-size:9px;min-width:0;padding:4px}
 .route-legend{gap:7px;padding:11px 12px;font-size:9px}
 .route-footer{display:block}
 .route-footer button{margin-top:10px}
 .detail-bottom{display:block}
 .detail-bottom a{display:block;margin-top:10px}
}
@media(max-width:350px){
 .route-columns,.route-stop{grid-template-columns:minmax(0,1fr) 42px 42px 48px}
 .stop-name strong{font-size:10px}
}


/* Rail detail v3 – nationwide data addons and interactive station timeline */
.journey-km{display:flex;flex-direction:column;align-items:center;gap:2px;margin-top:5px;padding-top:7px;border-top:1px solid #e0eaf1}
.journey-km b{font-size:15px;color:#2c749b;white-space:nowrap}
.journey-km small{font-size:10px;color:#8499a9}
.journey-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:12px 16px 14px}
.journey-facts>div{padding:11px 13px;background:#f7fafc;border:1px solid #e0ebf2;border-radius:7px;display:flex;flex-direction:column;gap:5px}
.journey-facts>div span{font-size:10px;color:#748ca0;font-weight:760}
.journey-facts>div strong{font-size:20px;font-weight:900;letter-spacing:-.5px;color:#285b7a}
.journey-facts>div strong small{font-size:11px;color:#7490a2}
.facts-source{padding:10px 15px 15px;font-size:10px;color:#8ca0af;border-top:1px solid #e8eff4;line-height:1.55}
.connection-hub{border-top:1px solid #e5edf2;padding:14px 17px 13px}
.connection-hub:first-child{border-top:0}
.hub-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:8px;flex-wrap:wrap}
.hub-head strong{color:#245b7c;font-size:13px;font-weight:860}
.hub-head span{color:#7f97a7;font-size:10px}
.connections{display:grid;gap:6px}
.connection{display:grid;grid-template-columns:56px minmax(0,1fr) 73px;gap:11px;align-items:center;text-decoration:none;border:1px solid #e0eaf1;background:#f8fbfd;border-radius:7px;padding:9px 10px;color:#284a64;transition:background .15s ease}
.connection:hover,.connection:focus-visible{background:#edf6fb;border-color:#b7d6e7}
.connection-time{font-size:17px;font-weight:900;color:#2f7ca8}
.connection-destination{display:flex;flex-direction:column;gap:2px;min-width:0}
.connection-destination strong{font-size:12px;line-height:1.2;overflow-wrap:anywhere}
.connection-destination small{color:#8499a9;font-size:10px}
.connection-window{font-size:13px;font-weight:850;color:#52798f;text-align:right;white-space:nowrap}
.connection-window small{display:block;font-size:9px;font-weight:650;color:#9aacb8}
.connection-empty{font-size:11px;color:#92a3af;padding:7px 0}
.connection-disclaimer{margin-top:2px;font-size:10px;color:#8298a8;line-height:1.55;border-top:1px solid #e6eef4;padding:13px 17px 16px}
.connection-disclaimer strong{color:#678499}

.rail-progress-card{margin-bottom:15px;overflow:hidden;min-width:0;border-color:#d4e4ee}
.rail-progress-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px 14px}
.rail-progress-heading h2{font-size:22px;line-height:1.25;font-weight:900;letter-spacing:-.5px;color:#214b69;margin:5px 0}
.rail-progress-heading p{font-size:11px;line-height:1.5;color:#7e95a6;margin:0}
.rail-live-caption,.rail-archive-caption{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;font-size:10px;font-weight:850;border:1px solid #cee4d9;background:#eef8f2;color:#438569;border-radius:7px;padding:8px 11px}
.rail-archive-caption{color:#577d93;border-color:#d7e5ee;background:#f5f9fc}
.rail-live-caption i{width:8px;height:8px;border-radius:50%;background:#399a77;box-shadow:0 0 0 3px rgba(57,154,119,.12)}
.rail-terminal-line{display:flex;justify-content:space-between;gap:20px;padding:0 22px;margin-top:3px}
.rail-terminal-line>span{display:flex;flex-direction:column;gap:3px;min-width:0}
.rail-terminal-line>span:last-child{text-align:right}
.rail-terminal-line b{font-size:12px;color:#326a89}
.rail-terminal-line small{font-size:10px;color:#91a4b2}
.rail-progress-scroll{overflow-x:auto;overflow-y:hidden;overscroll-behavior-inline:contain;scrollbar-width:thin;scrollbar-color:#bdd3e1 transparent;padding:0 11px 4px;outline-offset:-2px}
.rail-progress-track{position:relative;display:grid;grid-template-columns:repeat(var(--rail-stop-count), 38px);width:max-content;min-width:100%;height:99px;align-items:start;padding-top:20px;margin:0 auto}
.rail-track-rule{position:absolute;left:19px;right:19px;top:38px;height:4px;background:#dbe5ed;border-radius:9px;overflow:hidden}
.rail-track-completed{height:100%;background:linear-gradient(90deg,#61b0ac,#368caf);border-radius:9px}
.rail-progress-point{position:relative;display:flex;align-items:center;flex-direction:column;border:0;background:transparent;color:#879ba9;cursor:pointer;outline-offset:-3px;padding:9px 0 0;width:38px;height:63px;min-width:0;font:inherit}
.rail-progress-dot{position:relative;z-index:1;width:12px;height:12px;border:3px solid #fff;border-radius:50%;background:#c1ccd6;box-shadow:0 0 0 1.5px #9fb4c2;transition:transform .12s ease}
.rail-progress-point.point-early .rail-progress-dot{background:#2491a2;box-shadow:0 0 0 1.5px #2491a2}
.rail-progress-point.point-on-time .rail-progress-dot{background:#31977c;box-shadow:0 0 0 1.5px #31977c}
.rail-progress-point.point-minor .rail-progress-dot{background:#cfaa54;box-shadow:0 0 0 1.5px #cfaa54}
.rail-progress-point.point-moderate .rail-progress-dot{background:#df8b4d;box-shadow:0 0 0 1.5px #df8b4d}
.rail-progress-point.point-late .rail-progress-dot{background:#c6574d;box-shadow:0 0 0 1.5px #c6574d}
.rail-progress-point.point-pending .rail-progress-dot{background:#fff;box-shadow:0 0 0 1.5px #b4c5d1}
.rail-progress-point.point-cancelled .rail-progress-dot{background:#8f8c9d;box-shadow:0 0 0 1.5px #8f8c9d}
.rail-progress-point.is-terminal .rail-progress-dot{width:14px;height:14px;margin-top:-1px;box-shadow:0 0 0 2px #4382a8}
.rail-progress-point.is-selected .rail-progress-dot,.rail-progress-point:hover .rail-progress-dot,.rail-progress-point:focus-visible .rail-progress-dot{transform:scale(1.5);box-shadow:0 0 0 3px rgba(38,108,153,.2),0 0 0 1px #245f8b}
.rail-end-label{position:absolute;top:36px;color:#557b93;font-weight:900;font-size:9px;letter-spacing:.45px}
.rail-train-marker{position:absolute;top:-22px;left:2px;display:flex;align-items:center;justify-content:center;width:34px;height:32px;border-radius:7px;color:#fff;background:#286e9e;box-shadow:0 2px 7px rgba(30,92,132,.22);z-index:2}
.rail-train-marker:after{content:"";position:absolute;bottom:-4px;left:15px;width:8px;height:8px;background:#286e9e;transform:rotate(45deg)}
.rail-train-marker svg{width:19px;height:19px;position:relative;z-index:1}
.rail-progress-detail{display:grid;grid-template-columns:minmax(200px,1.5fr) repeat(3,minmax(120px,1fr));gap:11px;margin:0 21px 15px}
.rail-selected-main,.rail-detail-stat{min-width:0;padding:12px 14px;background:#f2f8fb;border:1px solid #dae9f2;border-radius:8px;display:flex;flex-direction:column;gap:6px}
.rail-selected-main>span,.rail-detail-stat>span{font-size:9px;letter-spacing:.45px;color:#7f99a8;font-weight:840;text-transform:uppercase}
.rail-selected-main>strong{font-size:16px;color:#235c80;font-weight:900;line-height:1.25}
.rail-detail-stat>b{font-size:17px;color:#36749b;font-weight:860;line-height:1.2}
.rail-progress-foot{border-top:1px solid #e7eff5;padding:13px 21px 15px;background:#fbfdfe}
.rail-progress-legend{display:flex;align-items:center;gap:9px 17px;flex-wrap:wrap}
.rail-progress-legend>span{font-size:10px;color:#748d9f;font-weight:730;display:flex;align-items:center;gap:6px}
.rail-progress-legend i{width:9px;height:9px;border-radius:50%;background:#b8c7d1;display:inline-block}
.rail-progress-legend i.legend-early{background:#2491a2}
.rail-progress-legend i.legend-on-time{background:#31977c}
.rail-progress-legend i.legend-minor{background:#cfaa54}
.rail-progress-legend i.legend-moderate{background:#df8b4d}
.rail-progress-legend i.legend-late{background:#c6574d}
.rail-progress-legend i.legend-pending{background:#fff;border:1.5px solid #b4c5d1}
.rail-progress-foot p{font-size:10px;color:#8b9eac;line-height:1.55;margin:9px 0 0}
.rail-progress-foot p strong{color:#517b94}
.rail-selected-show{margin-left:auto;color:#3e799c;background:#fff;border:1px solid #cde1ed;border-radius:7px;padding:7px 10px;font-size:10px;font-weight:800;cursor:pointer}
@media(max-width:980px){
 .rail-progress-detail{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .rail-progress-heading{align-items:flex-start;flex-wrap:wrap;gap:9px}
}
@media(max-width:640px){
 .rail-progress-heading{padding:15px 14px 10px}
 .rail-progress-heading h2{font-size:18px}
 .rail-progress-heading p{font-size:10px}
 .rail-terminal-line{padding-inline:14px}
 .rail-terminal-line b{font-size:10px}
 .rail-progress-scroll{padding-inline:5px}
 .rail-progress-track{grid-template-columns:repeat(var(--rail-stop-count),36px)}
 .rail-progress-point{width:36px}
 .rail-train-marker{left:1px}
 .rail-progress-detail{margin:0 11px 11px;gap:7px}
 .rail-selected-main,.rail-detail-stat{padding:10px}
 .rail-selected-main>strong{font-size:14px}
 .rail-detail-stat>b{font-size:15px}
 .rail-progress-foot{padding:12px}
 .rail-progress-legend{gap:7px 11px}
 .rail-progress-legend>span{font-size:9px}
 .journey-facts{padding:10px;gap:7px}
 .journey-facts>div{padding:10px}
 .journey-facts>div strong{font-size:18px}
 .connection-hub{padding:12px}
 .connection{grid-template-columns:44px minmax(0,1fr) 59px;gap:6px;padding:8px}
 .connection-time{font-size:15px}
 .connection-destination strong{font-size:11px}
 .connection-window{font-size:11px}
}
@media(prefers-reduced-motion:reduce){
 .rail-progress-dot,.connection{transition:none}
}
/* Allow space above line for the train marker (never clip it). */
.rail-progress-track{height:115px;padding-top:36px}
.rail-track-rule{top:49px}


/* V4: full-width timeline, immediate detail panel, priority live times, continuous gradient route, actual GTFS track map */
.rail-progress-scroll{
  overflow:visible!important;
  overflow-x:visible!important;
  overflow-y:visible!important;
  width:100%;padding:0 15px 1px!important;
  scrollbar-width:none;
}
.rail-progress-scroll::-webkit-scrollbar{display:none}
.rail-progress-track{
  box-sizing:border-box;
  display:grid!important;
  grid-template-columns:repeat(var(--rail-stop-count),minmax(0,1fr))!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:92px!important;padding-top:31px!important;margin:0!important;
  align-items:start;
}
.rail-track-rule{
  left:calc(50% / var(--rail-stop-count))!important;
  right:calc(50% / var(--rail-stop-count))!important;
  top:43px!important;height:4px;
}
.rail-progress-point{
  width:100%!important;min-width:0!important;max-width:none!important;
  height:56px!important;
  padding:5px 0 0!important;
  display:flex;justify-content:flex-start;
}
.rail-progress-dot{
  width:12px;height:12px;min-width:0;flex:none;
  border:2px solid #fff;box-sizing:border-box;
  transition:transform .09s ease;
}
.rail-progress-point.is-terminal .rail-progress-dot{width:13px;height:13px}
.rail-train-marker{
  top:-23px!important;left:50%!important;
  transform:translateX(-50%);
  width:29px!important;height:29px!important;
  z-index:4!important;
}
.rail-train-marker:after{left:10px!important}
.rail-end-label{top:32px;font-size:9px}
.rail-progress-point.is-selected .rail-progress-dot,
.rail-progress-point:hover .rail-progress-dot,
.rail-progress-point:focus-visible .rail-progress-dot{
  transform:scale(1.36);
}
.rail-progress-detail{
  grid-template-columns:minmax(155px,1.45fr) repeat(4,minmax(110px,1fr));
  gap:9px;margin:0 20px 9px;
}
.rail-progress-detail .rail-detail-stat>b{font-size:16px}
#rail-selected-actual{color:#1c816b}
.rail-panel-nav{
 display:flex;align-items:center;justify-content:space-between;gap:10px;
 padding:0 20px 13px;
}
.rail-panel-nav button{
  font:inherit;font-weight:800;font-size:10px;line-height:1.25;
  border:1px solid #d2e3ee;border-radius:7px;background:#fff;color:#37789f;
  padding:8px 10px;cursor:pointer;white-space:nowrap;
}
.rail-panel-nav button:hover{background:#eef7fb}
.rail-panel-nav button:disabled{opacity:.37;cursor:default}
.rail-panel-nav>span{font-size:10px;color:#8199a9;text-align:center;overflow-wrap:anywhere}
.route-stops:before{display:none!important}
.route-stop{
  isolation:isolate;
  --rail-from:#bbc9d4;--rail-current:#bbc9d4;--rail-to:#bbc9d4;
}
.route-stop::before{
  content:"";position:absolute;z-index:0;
  left:21px;top:0;bottom:0;width:3px;
  background:linear-gradient(to bottom,var(--rail-from),var(--rail-current) 50%,var(--rail-to));
  pointer-events:none;
}
.stop-name{position:relative;z-index:2}
.stop-name .bead{
  width:18px!important;height:18px!important;position:relative;
  background:radial-gradient(circle at 25% 22%,#a8b9c7,#718a9d)!important;
  border:2px solid #fff!important;
  box-shadow:0 0 0 1px #9cabb8,0 1px 3px rgba(16,53,77,.18)!important;
  display:flex;align-items:center;justify-content:center;flex:none;
}
.route-stop.stop-confirmed .stop-name .bead::after{
  content:"✓";position:absolute;inset:0;
  color:#fff;font-size:11px;line-height:14px;font-weight:900;text-align:center;
  text-shadow:0 1px 1px rgba(0,0,0,.13);
}
.route-stop.deviation-early .stop-name .bead{
  background:radial-gradient(circle at 27% 20%,#62dfd1,#16798b)!important;
  box-shadow:0 0 0 1px #2c9bac,0 1px 3px rgba(16,53,77,.13)!important;
}
.route-stop.deviation-on-time .stop-name .bead{
  background:radial-gradient(circle at 27% 20%,#7ce9b8,#208b6a)!important;
  box-shadow:0 0 0 1px #42ad87,0 1px 3px rgba(16,53,77,.13)!important;
}
.route-stop.deviation-minor .stop-name .bead{
  background:radial-gradient(circle at 27% 20%,#fce69c,#c99524)!important;
  box-shadow:0 0 0 1px #d8ac50,0 1px 3px rgba(16,53,77,.13)!important;
}
.route-stop.deviation-moderate .stop-name .bead{
  background:radial-gradient(circle at 27% 20%,#ffba75,#d77b29)!important;
  box-shadow:0 0 0 1px #e4934b,0 1px 3px rgba(16,53,77,.13)!important;
}
.route-stop.deviation-late .stop-name .bead{
  background:radial-gradient(circle at 27% 20%,#ffa79b,#bd403f)!important;
  box-shadow:0 0 0 1px #d4665b,0 1px 3px rgba(16,53,77,.13)!important;
}
.route-stop.stop-forecast .stop-name .bead{
  background:linear-gradient(145deg,#fffef6,#fbe7b2)!important;
  box-shadow:0 0 0 1px #d6ae60!important;
}
.route-stop.stop-pending .stop-name .bead{
  background:#fff!important;box-shadow:0 0 0 1px #abc0ce!important;
}
.route-stop.stop-cancelled .stop-name .bead{
  background:radial-gradient(circle at 30% 20%,#c5abb6,#8b7682)!important;
}
.route-stop:first-child::before{top:50%}
.route-stop:last-child::before{bottom:50%}
.time-cell .time-primary{
  color:#2c5772;line-height:1.25;font-size:14px;font-weight:900;
  letter-spacing:-.3px;
}
.time-cell .time-primary.actual{color:#16866c;font-size:15px}
.time-cell .time-primary.forecast{color:#bb812e;font-size:15px}
.route-stop.deviation-late .time-primary.actual{color:#bd5448}
.route-stop.deviation-moderate .time-primary.actual{color:#c47a36}
.time-cell .scheduled-time{
  font-size:9px;line-height:1.1;font-weight:620;color:#879ba9;
}
.time-cell .forecast-hint{font-size:9px;font-weight:770;color:#b18a49}
.route-stop:not(.has-data) .time-cell b.scheduled{color:#486d84}
.route-stop.is-selected{box-shadow:inset 4px 0 #3984b5}
.rail-map-live{
  display:none;height:360px;margin:12px 13px 7px;
  width:calc(100% - 26px);border:1px solid #dce8ef;border-radius:9px;
  background:#edf4f7;overflow:hidden;position:relative;
}
.rail-map-live.is-ready{display:block}
.rail-map-live .leaflet-control-attribution{
  font:9px/1.4 system-ui,-apple-system,sans-serif;
  color:#60798d;background:rgba(255,255,255,.9);
}
.rail-map-live .leaflet-control-attribution a{color:#3472a2}
.rail-map-live .leaflet-container{font-family:inherit}
.rail-map-live .leaflet-pane{z-index:auto}
.map-card .map-focus{margin-top:9px}
.map-card .rail-map-live.is-ready + script + script + .rail-map-fallback{display:none}
.rail-map-fallback.is-hidden{display:none}
.leaflet-popup-content{font:11px/1.5 system-ui,sans-serif}
@media(max-width:1050px){
 .rail-progress-detail{grid-template-columns:repeat(3,minmax(0,1fr))}
 .rail-selected-main{grid-column:span 2}
 .rail-progress-track{height:90px!important}
}
@media(max-width:660px){
 .rail-progress-scroll{padding:0 10px 1px!important}
 .rail-progress-track{height:83px!important;padding-top:27px!important}
 .rail-track-rule{top:39px!important;height:3px}
 .rail-progress-point{height:48px!important;padding-top:6px!important}
 .rail-progress-dot{width:9px;height:9px;border:1.5px solid #fff}
 .rail-progress-point.is-terminal .rail-progress-dot{width:10px;height:10px}
 .rail-train-marker{top:-21px!important;width:25px!important;height:25px!important}
 .rail-train-marker svg{width:17px;height:17px}
 .rail-train-marker:after{left:9px!important}
 .rail-end-label{top:27px;font-size:8px}
 .rail-progress-detail{grid-template-columns:repeat(2,minmax(0,1fr));margin:0 11px 8px;gap:6px}
 .rail-selected-main{grid-column:span 2}
 .rail-detail-stat{min-width:0;padding:10px}
 .rail-detail-stat>b{font-size:14px!important}
 .rail-panel-nav{padding:0 11px 11px;gap:5px}
 .rail-panel-nav button{font-size:9px;padding:8px 7px}
 .rail-panel-nav>span{font-size:9px;max-width:130px}
 .route-stop::before{left:15px;width:2.5px}
 .stop-name .bead{width:16px!important;height:16px!important}
 .route-stop.stop-confirmed .stop-name .bead::after{font-size:10px;line-height:12px}
 .time-cell .time-primary,.time-cell .time-primary.actual,.time-cell .time-primary.forecast{font-size:12px}
 .time-cell .scheduled-time{font-size:8px}
 .time-cell .forecast-hint{font-size:8px}
 .rail-map-live{height:315px}
}
@media(max-width:380px){
 .rail-progress-dot{width:8px;height:8px}
 .rail-progress-point.is-terminal .rail-progress-dot{width:9px;height:9px}
 .rail-panel-nav>span{font-size:8px}
}


/* V5 — exact 0 seconds is its own gray, timetable-exact category. */
.rail-progress-point.point-exact .rail-progress-dot{
  background:#8e9ca8;
  box-shadow:0 0 0 1.5px #8898a5;
}
.rail-progress-legend i.legend-exact{
  background:#8e9ca8;
  box-shadow:0 0 0 1px #8e9ca8;
}
.route-stop.deviation-exact .stop-name .bead{
  background:radial-gradient(circle at 27% 20%,#c5d0d8,#798a99)!important;
  box-shadow:0 0 0 1px #98a7b4,0 1px 3px rgba(16,53,77,.13)!important;
}
.delay-tag.delay-exact{
  background:#edf1f4;
  color:#627483!important;
}
.zero-line{
  stroke:#8394a3;
  stroke-width:2.7;
  stroke-dasharray:none;
  opacity:1;
  vector-effect:non-scaling-stroke;
}
.train-delay-chart .chart-zero-label{
  fill:#566f81;
  font-size:12px;
  font-weight:850;
}
.delay-plot-point.is-exact circle{
  fill:#8e9ca8;
  stroke:#fff;
  stroke-width:2.2;
}
.chart-zero-guide{
  display:inline-block;
  width:19px;
  height:0;
  border-top:2.7px solid #8394a3;
  vertical-align:middle;
  margin-right:4px;
}
.chart-foot strong{color:#556f82;font-weight:840}


/* V6: the 0-minute baseline is a subtle guide; exact on-time stations are gray nodes. */
.train-delay-chart .zero-line{
  stroke:#b6c7d2;
  stroke-width:1.25;
  stroke-dasharray:4 5;
  opacity:.9;
  vector-effect:non-scaling-stroke;
}
.train-delay-chart .chart-zero-label{
  fill:#6f8798;
  font-size:11px;
  font-weight:750;
}
.chart-zero-guide{
  width:19px;
  border-top:1.25px dashed #b6c7d2;
}
.delay-plot-point.is-exact circle{
  fill:#8e9ca8;
  stroke:#fff;
  stroke-width:2.3;
}


/* V7: readable completed and remaining railway sections */
.rail-map-legend{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px 16px;
  padding:9px 15px 10px;
  margin:0 13px 10px;
  border:1px solid #e1ebf1;
  border-radius:7px;
  background:#f8fbfd;
}
.rail-map-legend>span{
  display:inline-flex;
  align-items:center;
  gap:7px;
  font-size:10px;
  font-weight:770;
  line-height:1.4;
  color:#688399;
}
.rail-map-legend i{
  display:inline-block;
  width:23px;
  height:0;
  flex:none;
  border-top:4px solid;
  border-radius:4px;
}
.rail-map-legend .rail-map-completed{border-color:#26a18a}
.rail-map-legend .rail-map-remaining{
  border-color:#8ca9b9;
  border-top-width:3px;
  border-top-style:dashed;
}
.rail-map-legend .rail-map-last{
  width:12px;
  height:12px;
  border:3px solid #dc913c;
  border-radius:50%;
  background:transparent;
}
.rail-map-fallback .route-segment:not(.travelled){
  stroke:#8ca9b9;
  stroke-dasharray:7 9;
  stroke-width:2.6px;
  opacity:.72;
}
.rail-map-fallback .route-segment.travelled{
  stroke:#26a18a;
  stroke-width:4.4px;
  opacity:.96;
}
@media(max-width:600px){
  .rail-map-legend{padding:8px 11px;gap:8px 13px}
  .rail-map-legend>span{font-size:9px}
}


/* Pending route: sufficiently visible over detailed basemap at national zoom. */
.rail-map-legend .rail-map-remaining{border-color:#7593a5;border-top-width:3.8px}
.rail-map-fallback .route-segment:not(.travelled){
  stroke:#7593a5;
  stroke-dasharray:9 7;
  stroke-width:3.6px;
  opacity:.9;
}


/* Postęp przejazdu: kilometraż i czas wg rozkładu, ostatnia potwierdzona stacja. */
.journey-progress{
  padding:16px 16px 13px;
  border-top:1px solid #e5edf3;
  display:flex;
  flex-direction:column;
  gap:15px;
}
.journey-progress-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  padding-bottom:1px;
}
.journey-progress-head>span{
  color:#6486a0;
  font-size:10px;
  font-weight:900;
  letter-spacing:.8px;
}
.journey-progress-head>strong{
  font-size:12px;
  color:#2b6286;
  font-weight:850;
}
.journey-progress-metric{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.journey-progress-line{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:8px;
}
.journey-progress-line>span{
  color:#50758e;
  font-size:12px;
  font-weight:800;
}
.journey-progress-line small{
  color:#8a9ea9;
  font-size:10px;
  font-weight:650;
}
.journey-progress-line>strong{
  color:#235b7d;
  font-size:22px;
  letter-spacing:-.5px;
  font-weight:920;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.journey-progress-track{
  position:relative;
  width:100%;
  height:11px;
  border-radius:20px;
  overflow:hidden;
  background:#e8eff4;
  border:1px solid #dbe6ee;
}
.journey-progress-fill{
  display:block;
  height:100%;
  border-radius:inherit;
}
.journey-progress-fill.distance{background:linear-gradient(90deg,#52bea4,#228d82)}
.journey-progress-fill.time{background:linear-gradient(90deg,#79b7e0,#367aa9)}
.journey-progress-caption{
  font-size:11px;
  line-height:1.35;
  color:#7992a3;
  font-variant-numeric:tabular-nums;
}
.journey-progress-note{
  margin:0;
  padding:9px 11px;
  background:#f4f8fb;
  border:1px solid #e2ecf4;
  border-radius:7px;
  font-size:10px;
  line-height:1.55;
  color:#7b92a3;
}
@media(max-width:600px){
  .journey-progress{padding:12px 11px 12px;gap:13px}
  .journey-progress-line>strong{font-size:20px}
}


/* V9 – station-specific, source-mapped disruptions. */
.route-card{overflow:visible}
.route-stop-wrap{position:relative;isolation:isolate;z-index:1}
.route-stop-wrap:hover,.route-stop-wrap:focus-within{z-index:30}
.route-stop-wrap.has-disruption .route-stop{
  min-height:87px;
  padding-bottom:28px;
}
.station-disruption-details{
  position:absolute;
  left:43px;
  bottom:7px;
  z-index:2;
  max-width:calc(100% - 56px);
}
.station-disruption-label{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:3px 7px;
  border:1px solid #f0b5aa;
  border-radius:16px;
  background:#fff1ee;
  color:#b95343;
  font-size:9px;
  font-weight:900;
  line-height:1.25;
  list-style:none;
  cursor:pointer;
  white-space:nowrap;
}
.station-disruption-label::-webkit-details-marker{display:none}
.station-disruption-label::marker{content:""}
.station-disruption-label:hover,
.station-disruption-label:focus-visible,
.station-disruption-details[open] .station-disruption-label{
  border-color:#d47b6c;
  background:#ffe6e1;
  color:#9e3e31;
}
.station-disruption-panel{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  width:min(330px,calc(100vw - 85px));
  max-width:calc(100vw - 70px);
  display:none;
  background:#fff;
  border:1px solid #e9c4b9;
  border-radius:9px;
  box-shadow:0 12px 30px rgba(25,55,76,.20);
  padding:11px 13px;
  z-index:100;
  color:#425d70;
}
.station-disruption-details[open] .station-disruption-panel{display:block}
@media(hover:hover){
  .station-disruption-details:hover .station-disruption-panel{display:block}
}
.station-disruption-heading{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  flex-wrap:wrap;
  gap:7px;
  padding-bottom:8px;
  margin-bottom:6px;
  border-bottom:1px solid #f0e3dd;
}
.station-disruption-heading strong{font-size:12px;color:#9e4d40}
.station-disruption-heading span{font-size:9px;color:#9e9da0}
.station-disruption-panel article{padding:7px 0}
.station-disruption-panel article+article{border-top:1px solid #f3e8e3}
.station-disruption-panel article>strong{font-size:11px;color:#9b4c3e}
.station-disruption-panel article>p{
  margin:5px 0 0;
  font-size:11px;
  line-height:1.55;
  color:#5e6d78;
  white-space:normal;
  overflow-wrap:anywhere;
}
@media(max-width:640px){
  .route-stop-wrap.has-disruption .route-stop{min-height:85px;padding-bottom:31px}
  .station-disruption-details{left:33px;bottom:6px;max-width:calc(100% - 43px)}
  .station-disruption-label{font-size:8px;padding:3px 6px}
  .station-disruption-panel{width:min(275px,calc(100vw - 62px));max-width:calc(100vw - 62px)}
}


/* Ensure an opened station notice overlays later timetable rows, even after focus moves. */
.route-stop-wrap:has(> .station-disruption-details[open]){z-index:60}


/* V10: station disruptions must not break the continuous route gradient.
   Draw the spine across WHOLE row wrappers, not within the shortened buttons. */
.route-stops::before,
.route-stop-wrap > .route-stop::before{
  display:none!important;
  content:none!important;
}
.route-stop-wrap{
  --rail-dot-ratio:50%;
  position:relative;
  isolation:isolate;
}
.route-stop-wrap.has-disruption{--rail-dot-ratio:35%}
.route-stop-wrap::before{
  content:"";
  position:absolute;
  left:21px;
  top:0;
  bottom:0;
  width:3px;
  z-index:2;
  pointer-events:none;
  background:linear-gradient(to bottom,
    color-mix(in srgb,var(--rail-from) 50%,var(--rail-current)) 0%,
    var(--rail-current) var(--rail-dot-ratio),
    color-mix(in srgb,var(--rail-current) 50%,var(--rail-to)) 100%);
}
.route-stop-wrap:first-child::before{top:33px}
.route-stop-wrap:last-child::before{bottom:33px}
.route-stop-wrap .route-stop .stop-name{
  position:relative;
  z-index:3;
}
.route-stop-wrap .route-stop .stop-name .bead{z-index:3}
@media(max-width:640px){
  .route-stop-wrap::before{left:15px;width:2.5px}
  .route-stop-wrap.has-disruption{--rail-dot-ratio:33%}
  .route-stop-wrap:first-child::before{top:29px}
  .route-stop-wrap:last-child::before{bottom:29px}
}
/* Same PHP color palette for timetable, timeline, and the delay chart. */
.train-delay-chart .delay-segment{
  stroke-width:3.4px;
  stroke-linecap:round;
  vector-effect:non-scaling-stroke;
  fill:none;
}
.train-delay-chart .delay-plot-point circle{
  fill:var(--delay-point-color,#2d8ba6)!important;
  stroke:#fff;
  stroke-width:2.25px;
}
.train-delay-chart .delay-plot-point.is-selected circle{
  stroke:#1f4f70;
  stroke-width:3px;
}


/* Confirmed departure / arrival beneath scheduled times, never predictions. */
.journey-terminal>span.journey-actual{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:6px;
  margin-top:7px;
  color:#698b80;
  font-size:11px;
  line-height:1.4;
  font-weight:720;
}
.journey-terminal>span.journey-actual b{
  margin-right:0;
  color:#21866d;
  font-size:20px;
  font-weight:900;
  letter-spacing:-.4px;
  font-variant-numeric:tabular-nums;
}
.journey-terminal.final>span.journey-actual{
  justify-content:flex-end;
}
@media(max-width:640px){
  .journey-terminal>span.journey-actual{font-size:9px;gap:4px;margin-top:6px}
  .journey-terminal>span.journey-actual b{font-size:16px}
}

/* Match confirmed terminal times to the timetable's delay severity palette. */
.journey-terminal>span.journey-actual{color:#7e92a1}
.journey-terminal>span.journey-actual b{color:#426b84}
.journey-terminal>span.journey-actual.actual-early b{color:#268f9e}
.journey-terminal>span.journey-actual.actual-exact b{color:#8494a1}
.journey-terminal>span.journey-actual.actual-on-time b{color:#258e72}
.journey-terminal>span.journey-actual.actual-minor b{color:#ba923b}
.journey-terminal>span.journey-actual.actual-moderate b{color:#d17d3f}
.journey-terminal>span.journey-actual.actual-late b{color:#c2564b}

/* Cross-navigation to station board, non-intrusive within the selected-point summary. */
.rail-station-context{
  color:#2b79a4;font-weight:850;font-size:10px;
  padding:4px 0;text-decoration:none;display:inline-flex;
  align-items:center;white-space:nowrap;max-width:100%;
}
.rail-station-context:hover,.rail-station-context:focus-visible{text-decoration:underline;color:#175c86}
.rail-station-context[hidden]{display:none!important}
@media(max-width:680px){.rail-station-context{font-size:10px;white-space:normal}}
