/* Interactive "problem and solution" page */
#demo { font:14px/1.5 system-ui,sans-serif; }
#demo [hidden] { display:none; }
#demo button { font:13px system-ui,sans-serif; color:var(--fg); background:transparent; border:1px solid var(--line); border-radius:6px; padding:5px 11px; cursor:pointer; }
#demo button[aria-pressed="true"] { background:var(--soft); border-color:var(--accent); color:var(--accent); }
.d-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:10px 0; }
.d-label { width:92px; color:var(--muted); }
.d-seg { display:flex; flex-wrap:wrap; gap:6px; }
.d-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:8px; margin:14px 0; }
.d-cards div { border:1px solid var(--line); border-radius:8px; padding:8px 12px; }
.d-cards span { display:block; color:var(--muted); font-size:12px; }
.d-cards b { font-size:18px; }
.d-time input { flex:1; min-width:140px; accent-color:var(--accent); }
.d-time output { width:96px; font-variant-numeric:tabular-nums; }
.d-grid { display:grid; grid-template-columns:minmax(0,1.9fr) minmax(0,1fr); gap:18px; margin-top:14px; align-items:start; }
@media (max-width:640px) { .d-grid { grid-template-columns:minmax(0,1fr); } }
#d-map { width:100%; border:1px solid var(--line); border-radius:8px; }
.d-box { border:1px solid var(--line); border-radius:8px; padding:12px 14px; }
.d-box p { margin:.5em 0 0; }
.d-legend { display:flex; flex-direction:column; gap:5px; margin-top:12px; color:var(--muted); font-size:13px; }
.d-legend svg { width:13px; height:13px; margin-right:7px; vertical-align:-2px; }
.d-gridline { stroke:var(--line); stroke-width:.04; }
.d-node { cursor:pointer; }
.d-depot { fill:var(--fg); }
.d-depot-text { fill:var(--bg); font:700 .75px system-ui,sans-serif; text-anchor:middle; }
.d-both { fill:#c9c6bd; } .d-onlyA { fill:#9cc4ee; } .d-onlyB { fill:#f3c48f; }
.d-ok { fill:#6cc58a; } .d-late { fill:#ee7b72; }
.d-selected { stroke:var(--fg); stroke-width:.14; }
.d-urgent { fill:none; stroke:#d33a2c; stroke-width:.12; }
.d-id { fill:#1d1d1f; font:600 .55px system-ui,sans-serif; text-anchor:middle; }
.d-veh { stroke:var(--bg); stroke-width:.1; }
.d-veh-text { fill:#fff; font:700 .48px system-ui,sans-serif; text-anchor:middle; }
.d-scroll { overflow-x:auto; }
.d-scroll svg { width:100%; min-width:520px; display:block; }
.d-axis { stroke:var(--line); }
.d-tick { fill:var(--muted); font:11px system-ui,sans-serif; }
.d-tick.d-bad, .d-bad { fill:#d33a2c; color:#d33a2c; font-weight:700; }
.d-now { stroke:var(--fg); stroke-dasharray:3 3; }
.d-handle { cursor:ew-resize; }
.d-knob { fill:var(--fg); stroke:var(--bg); stroke-width:1.5; }
.d-front-line { fill:none; stroke:var(--muted); stroke-dasharray:4 4; }
.d-point { fill:var(--bg); stroke:var(--accent); stroke-width:2.5; }
.d-point.d-current { fill:var(--accent); }
.d-note { color:var(--muted); font-size:13px; }
.d-sched-title { border-top:1px solid var(--line); padding-top:10px; margin-top:10px !important; }
.d-veh-name { margin-top:10px; font-weight:600; }
.d-veh-name i { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:7px; }
.d-orders { list-style:none; margin:4px 0 0; padding:0; }
#demo .d-orders button { display:flex; justify-content:space-between; gap:8px; width:100%; text-align:left; border-color:transparent; padding:2px 6px; font-variant-numeric:tabular-nums; }
#demo .d-orders button:hover { border-color:var(--line); }
#d-table { display:table; width:100%; min-width:420px; border-collapse:collapse; font-variant-numeric:tabular-nums; }
#d-table th, #d-table td { text-align:left; padding:5px 10px; border:0; border-bottom:1px solid var(--line); }
#d-table th, #d-table tfoot td { color:var(--muted); font-weight:600; }
#d-table tbody tr { cursor:pointer; }
#d-table tbody tr:hover, #d-table tr.d-current-row { background:var(--soft); }
#demo #d-table button { border:0; padding:0; background:none; color:inherit; font:inherit; }
