/* Selected UMCG white-card design; layout and model remain in style.css/app.mjs. */
@font-face{font-family:Outfit;src:url('fonts/Outfit-400.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:Outfit;src:url('fonts/Outfit-500.ttf') format('truetype');font-weight:500;font-display:swap}
@font-face{font-family:Outfit;src:url('fonts/Outfit-600.ttf') format('truetype');font-weight:600;font-display:swap}
@font-face{font-family:Outfit;src:url('fonts/Outfit-700.ttf') format('truetype');font-weight:700;font-display:swap}
:root{color-scheme:light;--bg:#f3f9fd;--panel:#fff;--border:#d6e4f2;--muted:#365989;--text:#003183;--cyan:#003183;--red:#e51b38;--yellow:#ffb84d;--orange:#ff8200;--chart-grid:#dce8f4;--chart-weekend:#f4f9fd;--chart-fit:#d9f0fa;--chart-overflow:#f69ba9;--chart-line:#003183;--chart-capacity:#f58100;--chart-cursor:#18a1be}
html,body{font-family:Outfit,Noto,Arial,sans-serif;background:#f3f9fd}
#dashboard{background:linear-gradient(180deg,#fff 0%,#f1f8fe 25%,#edf6fd 100%)}
.brand{gap:18px}.brand-logo{display:block;width:136px;height:auto;flex:none}.brand h1{font-size:30px;font-weight:700;letter-spacing:-.6px}.divider{border-color:#9bb7d9;height:29px}.subtitle{color:var(--text);font-size:20px}.experimental{display:none}
button,select{background:#fff;border-color:#b7cbe8;color:var(--text);box-shadow:0 1px 2px #00318308}
button:hover,select:hover{background:#edf5ff;border-color:#5f8bc1}
button:focus-visible,select:focus-visible,input:focus-visible{outline-color:#ff8200}
.quiet{color:var(--text);border-color:#9eb9df;background:#ffffffb3}
.toolbar{border-bottom:0}.label{color:var(--text)}
.segmented button{font-weight:500}.segmented button[aria-pressed=true]{color:#fff;background:#003183;border-color:#003183;box-shadow:0 2px 5px #00318316}
.max-badge{color:var(--text);border-color:#9eb9df;background:#fff}
.toggle{background:#a9b8ca;box-shadow:none}.toggle:hover{background:#93a9c0}.toggle[aria-checked=true]{background:#003183}.toggle[aria-checked=true]:hover{background:#124b99}.toggle span{background:#fff;box-shadow:0 1px 3px #00318324}
#products{background:transparent;border:0;padding:0;gap:9px}
.product{background:#fff;border:1px solid #dce8f3;border-left:3px solid var(--product-color);border-radius:7px;box-shadow:0 1px 4px #0a42851a;padding:6px 9px}
.product.off{background:#f5f8fc}.product.off .product-name{color:#506987}.product-destination{color:#21497c}
.product select{background-color:#fff;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='m2 4 4 4 4-4' stroke='%23003183' fill='none'/%3E%3C/svg%3E")}
.panel,.garage{background:#fff;border-color:#d7e5f3;border-radius:10px;box-shadow:0 1px 4px #00318312,0 2px 2px #00318305}
.parking-icon{background:#003183;color:#fff;border:0;border-radius:5px;box-shadow:none}
.collapse{background:#fff;color:#003183;border-color:#c5d9ef}
.garage.collapsed{background:#fff}.rail-count{color:#003183}
.garage-head h2{color:#003183}
.eyebrow{color:#315b95}.summary h2{font-weight:700}
#shortage{background:#ffdee3;border:1px solid #ffdee3;color:#d6102c;border-radius:7px}
#shortage strong{color:#dc1231}
#shortage.clear{background:#e0f5ef;color:#126554;border-color:#ccece2}#shortage.clear strong{color:#126554}
.garage-summary-card{background:#fff;border-color:#dce7f4;border-radius:5px}
.garage-status{background:#d9f4e8;color:#00694b}.garage-status.over{color:#c21330;background:#ffe0e6}.garage-status.full{color:#775000;background:#ffe2b2}
.meter{background:#e5edf6}.garage-summary-status,.metric-count small{color:#365989}
.summary-lines span,.peak-line span{color:#214b7f}.summary-bottom{border-color:#d8e5f3}
.outline{background:#fff;color:#003183}.summary #goto-peak{background:#003183;border-color:#003183;color:#fff;font-weight:500}
.summary #goto-peak:hover{background:#124b99}
#mix-bar{background:#edf3f9}#mix-bar>span{border-color:#ffffff66}
.legend-item .name{color:#21497c}.legend-item .percentage{color:#365989}
.time-readout{border-color:#cbdcf0}.time-readout strong{color:#003183}.time-readout>span:last-child{color:#365989}
.timeline-key .teal{background:#14b2b9}.timeline-key .red{background:#ef4962}
#problem-track span{background:#14b2b9}#problem-track span.problem{background:#ff526b}
input[type=range]::-webkit-slider-thumb{background:#fff;border-color:#003183;box-shadow:0 1px 3px #00318335}
input[type=range]::-moz-range-thumb{background:#fff;border-color:#003183}
#time-ticks{color:#365989}
.chart text{font-family:Outfit,Noto,Arial,sans-serif}.chart .axis{fill:#315786}.chart .day-label,.chart .peak{fill:#003183}.chart .day-label:hover{fill:#1177ae}.chart .peak-excess{fill:#e51b38}
.no-garages{border-color:#9bb9dc;background:#fff;color:#315786}
dialog{background:#fff;color:#003183;border-color:#bcd1e9;box-shadow:0 18px 80px #00318330}dialog p{color:#294d7c}dialog::backdrop{background:#00275b59}#error{background:#fff1f3;color:#9f1831}
@media(min-width:1700px){.brand-logo{width:150px}.brand h1{font-size:34px}.brand{gap:20px}}
/* A short wide window still has to contain the complete right-hand summary. */
@media(min-width:1700px) and (max-height:960px){#dashboard{grid-template-rows:46px 44px 72px minmax(250px,1fr) 92px 84px;gap:10px}.product-detail{grid-template-rows:24px 19px 1fr}.summary{padding:10px;gap:2px}.summary h2{font-size:16px}.summary-lines>div,.peak-line{font-size:13px}.summary-lines strong{font-size:15px}#shortage{padding:5px}#shortage strong{font-size:26px}.garage-summary-card .metric-count{font-size:18px}.garage-summary-status,.garage-summary-card .garage-status{font-size:11px}}
/* Stable summary: both outcomes occupy exactly the same space. */
#shortage,#shortage.clear{height:76px;min-height:76px;flex:0 0 76px;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:6px;line-height:1.3}
#shortage strong,#shortage.clear strong{font-size:28px;line-height:1.2;white-space:nowrap}
.garage-summary-card[role=button]{cursor:pointer}
.garage-summary-card[role=button]:hover{background:#f0f6fd;border-color:#91b2da}
.garage-summary-card[role=button]:focus-visible{outline:2px solid #ff8200;outline-offset:2px}

/* Collapsed garages double as vertical occupancy meters. */
.garage.collapsed{position:relative;isolation:isolate}
.garage.collapsed .rail-fill{position:absolute;inset:auto 0 0;height:0;background:#bce5f5;box-shadow:inset 0 2px 0 #42a2c7;pointer-events:none;z-index:0}
.garage.collapsed .rail-fill[data-status=full]{background:#ffe0a8;box-shadow:inset 0 2px 0 #ef9b23}
.garage.collapsed .rail-fill[data-status=over]{background:#ffcbd4;box-shadow:inset 0 2px 0 #e51b38}
.garage.collapsed .garage-head{position:relative;z-index:1}

.evening-control{gap:8px;flex:none}.evening-control .label{white-space:nowrap}
#evening-start{appearance:none;padding:6px 27px 6px 12px;font-size:14px;font-weight:600;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='m2 4 4 4 4-4' stroke='%23003183' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 8px center}

/* Garage selection: joined buttons, within the existing product-card dimensions. */
.garage-choices{grid-column:2;grid-row:2;display:flex;min-width:0;height:24px;border:1px solid #9ebbe1;border-radius:10px;background:#fff}
.garage-choices[hidden]{display:none}
.garage-choices button{flex:1 1 50%;min-width:0;height:100%;padding:1px 2px;border:0;border-radius:0;background:#fff;color:#003183;font-size:11px;font-weight:700;line-height:18px;box-shadow:none;transition:background .15s,color .15s}
.garage-choices button:first-child{flex-basis:56%;border-radius:9px 0 0 9px;border-right:1px solid #b7cbe8}
.garage-choices button:last-child{flex-basis:44%;border-radius:0 9px 9px 0}
.garage-choices button:hover{background:#eaf3ff}
.garage-choices button[aria-pressed=true]{background:#003183;color:#fff}
.garage-choices button[aria-pressed=true]:hover{background:#003183}
.garage-choices button:focus-visible{position:relative;z-index:1;outline:2px solid #003183;outline-offset:2px}
@media(min-width:1700px){.garage-choices button{font-size:12px}}
@media(max-width:1699px){
 .product.off{grid-template-columns:minmax(0,1fr) 34px}
 .product.off .product-name{grid-column:1;grid-row:1}
 .product.off .toggle{grid-column:2;grid-row:1;justify-self:end}
 .garage-choices{grid-column:1/-1}
}

@media(max-width:1399px){.garage-choices button{font-size:10.5px}}

/* Scrubbing the chart must never select labels or surrounding text. */
#garage-grid{-webkit-user-select:none;user-select:none}
.garage-head [data-back-week][hidden]{display:none}

/* Mobile layout uses the viewport width and normal vertical scrolling. */
@media(max-width:1100px){
 html,body{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto}
 #dashboard{position:relative;display:flex;flex-direction:column;width:100%!important;height:auto!important;min-height:100dvh;transform:none!important;padding:12px;gap:12px}
 header{flex-wrap:wrap;gap:10px}.brand{flex-wrap:wrap;gap:10px;width:100%}.brand-logo{width:110px;height:auto}.brand h1{font-size:23px;white-space:normal}.brand .divider{display:none}.subtitle{font-size:15px;width:100%}.header-actions{margin-left:auto}
 .toolbar{flex-wrap:wrap;gap:12px}.control-set{flex-wrap:wrap;gap:7px}.control-set.days{width:100%}#days{width:100%;display:grid;grid-template-columns:2fr repeat(7,1fr);gap:3px}#days button{padding:8px 0;font-size:12px}.segmented button{min-height:36px}
 #products{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:none;gap:8px}.product{height:100px;padding:8px;grid-template-rows:minmax(0,1fr) 30px}.product-name{font-size:14px;line-height:17px}.garage-choices{height:30px}.garage-choices button{font-size:11px}.product .toggle{width:34px;height:20px}
 main{flex-direction:column;gap:12px}#garage-grid{flex-wrap:wrap;gap:8px;flex:none;width:100%}.garage:not(.collapsed){flex:0 0 100%;height:420px;order:0}.garage.collapsed{flex:1 1 40%;height:52px;order:1}.garage.collapsed .garage-head{flex-direction:row;padding:8px;gap:8px;align-items:center}.garage.collapsed h2{writing-mode:horizontal-tb;font-size:15px;gap:6px}.rail-count{writing-mode:horizontal-tb;font-size:12px;margin:0 0 0 auto}.garage.collapsed h2 .parking-icon{display:none}.garage.collapsed .rail-fill{opacity:.25}.chart-box{min-width:0}.chart .axis{font-size:10px}.chart .day-label,.chart .peak{font-size:10px}.chart .peak-excess{font-size:9px}
 .summary{flex:auto;width:100%;padding:12px}.summary-bottom{margin-top:8px}#garage-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.garage-summary-heading{flex-wrap:wrap}.garage-summary-status{flex-wrap:wrap}.garage-summary-card{min-width:0}
 .product-detail{display:flex;flex-direction:column;gap:10px;padding:12px}.detail-heading{flex-wrap:wrap;gap:8px}.detail-heading h2{white-space:normal}#mix-tabs{flex-wrap:wrap}#mix-bar{height:24px;flex:none}#mix-legend{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;gap:10px}.legend-item{font-size:12px}
 .timeline{flex-wrap:wrap;padding:12px;gap:8px}.time-readout{width:100%;border:0}.slider-area{order:5;flex:0 0 100%}.timeline .step,.timeline #play{min-height:40px}.range-wrap{height:36px}#problem-track{top:15px}.timeline-key{gap:8px}
}
@media(max-width:600px){#products{grid-template-columns:repeat(2,minmax(0,1fr))}.garage:not(.collapsed){height:360px}.brand h1{font-size:22px}.garage-head h2{font-size:19px}.summary .metric-count{font-size:22px}.garage-summary-card h3{font-size:14px}.garage-summary-status{font-size:11px}}
@media(max-width:1100px){.garage-summary-heading{height:auto;min-height:22px}.garage-summary-card{padding:8px 6px}.garage-summary-heading .metric-count{width:100%}.rail-count{white-space:nowrap;font-size:10px}.garage.collapsed h2{font-size:13px}}
