/* Planning components supply all timeline geometry. RUS only adds its palette
   and the viewport needed for a large, browser-only import. */
.rus-list-help { margin: 0; color: #627381; font-size: .72rem; }
.rus-graph-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .8rem; }
.rus-graph-toolbar { justify-content: space-between; margin: .6rem 0; }
.rus-controls { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .4rem 0; }
.rus-source-summary { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.rus-source-summary .rus-source-name { max-width: 200px; font-size: .72rem; color: #526779; }
.rus-source-summary p { margin: 0; font-size: .72rem; color: #08713c; font-weight: 650; }
.rus-source-summary p.is-error { color: #9c392d; }
.rus-control-actions, .rus-graph-agent-nav { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.rus-graph-agent-nav { font-size: .7rem; }
.rus-graph-period { color: #173b2d; font-weight: 650; font-size: .72rem; white-space: nowrap; }
.rus-graph-local { color: #65766e; font-size: .66rem; }
.rus-graph-summary { margin: .4rem 0; color: #08713c; font-size: .74rem; font-weight: 650; }

.rus-page [data-rus-graph].planning-page { padding-bottom: 0; }
.rus-page.is-loaded:not([aria-busy]) [data-rus-status] { display: none; }
body:has(.rus-page.is-graphic-view) { overflow: hidden; }
body:has(.rus-page.is-graphic-view) .main-nav { display: none; }
.main-content:has(.rus-page.is-graphic-view) { width: 100%; height: 100dvh; min-height: 0; max-width: none; padding: 0; overflow: hidden; }
.rus-page.is-graphic-view { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; width: 100%; height: 100dvh; max-width: none; margin: 0; padding: 0; background: #fff; }
.rus-page.is-graphic-view > [data-rus-results] { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.rus-page.is-graphic-view .rus-controls { flex: 0 0 auto; margin: 0; padding: 4px 8px; border-bottom: 1px solid #d9e1dc; }
.rus-page.is-graphic-view .rus-filter-panel { position: absolute; top: var(--rus-controls-height, 42px); left: 0; right: 0; z-index: 350; max-height: min(320px, 50dvh); overflow-y: auto; background: #fff; box-shadow: 0 5px 18px #17304422; }
.rus-page.is-graphic-view .rus-filters { margin: 0; border-radius: 0; }
.rus-page.is-graphic-view [data-rus-graph] { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.rus-page.is-graphic-view .rus-graph-toolbar { flex: 0 0 auto; flex-wrap: nowrap; justify-content: flex-start; gap: .6rem; margin: 0; padding: 4px 8px; overflow-x: auto; border-bottom: 1px solid #d9e1dc; }
.rus-page.is-graphic-view .rus-graph-toolbar > * { flex-shrink: 0; }
.rus-page.is-graphic-view .rus-graph-agent-nav { margin-left: auto; }
.rus-page.is-graphic-view .rus-graph-summary { display: none; }
.rus-page.is-graphic-view .rus-graph-scroll { flex: 1; min-height: 0; max-height: none; }
.rus-page.is-graphic-view > [data-rus-status], .rus-page.is-graphic-view > [data-rus-error] { flex: 0 0 auto; margin: 0; padding: 5px 8px; }
.rus-graph-scroll { max-height: 70vh; overflow-y: auto; overflow-x: hidden; position: relative; background: #fff; }
.rus-graph-table .planning-header { top: 0; z-index: 150; }
.rus-graph-table .planning-scroll { overflow-y: hidden; }
.rus-graph-table .planning-sidebar { z-index: 145; }
.rus-graph-service { display: contents; }
.rus-graph-service > .timeline-service-connector { padding: 0; border: 0; border-radius: 0; cursor: pointer; pointer-events: auto; }
.rus-graph-error { position: absolute; height: 54px; border: 1px solid #cc8b7e; background: #fff0eb; color: #8c2f20; font-size: .75rem; text-align: left; cursor: pointer; }
.rus-graph-empty { padding: 1rem; }

/* Palette only: symbols, heights, placement, borders and typography continue
   to come from the exact shared /planning component rules. */
.rus-graph-table .service-card.segment-train::before,
.rus-graph-table .service-card.segment-train .train-number { background: #173b2d; color: #fff; }
.rus-graph-table .is-deleted .service-card.segment-train::before,
.rus-graph-table .is-deleted .service-card.segment-train .train-number { background: #9c392d; }
.rus-graph-modal .service-rus-preview .sncf-reference-task[data-sncf-train] { background: #173b2d; }

.rus-graph-modal .rus-modal-content { min-height: 0; }
.rus-graph-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem 1rem; margin: .3rem 0 1rem; }
.rus-graph-facts > div { min-width: 0; }
.rus-graph-facts dt { margin-bottom: .15rem; color: #65766e; font-size: .66rem; }
.rus-graph-facts dd { margin: 0; color: #173044; font-size: .75rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.rus-graph-operation-details { margin: 1rem 0; font-size: .78rem; }
.rus-graph-operation-details summary { cursor: pointer; font-weight: 650; }
.rus-graph-modal pre { max-height: 250px; margin: .55rem 0; padding: .7rem; border: 1px solid #e2e9e5; border-radius: 4px; background: #f6f8f7; color: #344c3e; font-family: var(--font-mono); font-size: .67rem; white-space: pre-wrap; overflow: auto; overflow-wrap: anywhere; }
@media (max-width: 700px) {
    .rus-graph-scroll { max-height: 70dvh; }
    .rus-graph-toolbar { align-items: flex-start; gap: .4rem; }
    .rus-graph-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .rus-controls { flex-wrap: wrap; }
    .rus-page.is-graphic-view .rus-controls { flex-wrap: nowrap; gap: .3rem; }
    .rus-page.is-graphic-view .rus-source-summary { flex: 1; }
    .rus-page.is-graphic-view .rus-source-name { display: none; }
    .rus-page.is-graphic-view .rus-source-summary p { font-size: .65rem; white-space: nowrap; }
    .rus-page.is-graphic-view .rus-source-summary p.is-error { white-space: normal; }
    .rus-page.is-graphic-view .rus-controls .btn { min-height: 28px; padding: .25rem .4rem; font-size: .66rem; }
    .rus-page.is-graphic-view .rus-control-actions { gap: .25rem; }
}
