/* Operational hierarchy: navy surfaces, blue structure and cyan actions. */
.insight-sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.insight-bar { position: relative; }
.insights-view > .card, .insights-view > .kpi-grid, .insights-view > .insight-chart-grid { margin-bottom: 22px; }
.insights-view :is(h3, h4), .rule-lab :is(h3, h4) { color: #f2f8ff; }
.insight-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.insight-filters .form-field { flex: 1 1 170px; margin: 0; min-width: 0; }
.insight-filters .form-field :is(input, select) { width: 100%; min-width: 0; }
.insight-filters .form-error { flex-basis: 100%; margin: 0; }
.insight-filters .form-error:empty { display: none; }
.insight-filters input:disabled { opacity: .7; }
.insight-scope, .insight-note { color: #bed1e2; font-size: .82rem; line-height: 1.6; }
.insight-note { margin: 12px 0 22px; }
.insight-metric { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.insight-metric .kpi-label { min-height: 2.8em; font-size: .84rem; line-height: 1.4; }
.insight-metric .kpi-value { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.2; overflow-wrap: anywhere; }
.insight-link { color: #8cecf3; font-size: .8rem; margin-top: auto; }
.insight-chart-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(230px, 1fr); gap: 22px; }
.insight-chart-grid > .card { min-width: 0; }
.insight-chart-grid p, .rule-lab p { font-size: .84rem; color: #c6d7e5; }
.insight-bars { display: flex; gap: 3px; overflow-x: auto; padding: 12px 6px; scrollbar-color: #3a719b #10283d; }
.insight-bar { min-width: 22px; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; color: #c8deee; font-size: .6rem; border-radius: 5px; padding: 5px 1px; }
.insight-bar:hover, .insight-bar:focus-visible { color: #fff; background: #244b69; }
.insight-bar strong { font-size: .8rem; }
.insight-bar-track { height: 138px; width: 100%; display: flex; align-items: flex-end; border-bottom: 1px solid #44617a; }
.insight-bar-track > span { width: 100%; background: linear-gradient(0deg, #246ca3, #72edf2); border-radius: 5px 5px 0 0; }
.insight-type-list { display: grid; gap: 16px; margin-top: 24px; }
.insight-type { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; border-radius: 10px; padding: 12px; border: 1px solid #355773; }
.insight-type:hover { border-color: #72edf2; background: #163852; }
.insight-type strong { color: #f6fcff; font-size: 1.4rem; }
.insight-meter { height: 5px; grid-column: 1 / -1; background: #284a64; border-radius: 5px; overflow: hidden; }
.insight-meter > span { display: block; height: 100%; background: #72edf2; }
.insight-current { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font-size: .82rem; }
.insights-view .table-wrap { max-width: 100%; }
.insights-view table a { display: inline-block; padding-block: 7px; }
.insights-view #analysis-more, .insights-view #history-more { margin-top: 20px; }
.history-summary { position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; overflow: hidden; }
.history-summary > div { align-self: center; }
.history-summary > img { width: 100%; height: 220px; object-fit: cover; border-radius: 14px; }
.history-summary .plate-tag { font-size: 1.3rem; }
.history-image-note { color: #bed1e2; font-size: .72rem; grid-column: 1 / -1; }
.vehicle-timeline { list-style: none; margin: 28px 0 0; padding: 0; }
.vehicle-timeline > li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 18px; position: relative; padding: 0 0 26px; }
.vehicle-timeline > li:not(:last-child)::before { content: ''; position: absolute; top: 12px; left: 8px; bottom: 0; width: 2px; background: #355b78; }
.timeline-node { width: 18px; height: 18px; margin-top: 4px; background: #72edf2; border: 4px solid #244a67; border-radius: 50%; z-index: 1; }
.vehicle-timeline [data-timeline-kind="decision"] .timeline-node { background: #ffd287; }
.vehicle-timeline time { color: #bacfe0; font-size: .78rem; }
.vehicle-timeline h4 { margin: 9px 0; font-size: 1rem; }
.vehicle-timeline p { font-size: .83rem; margin: 8px 0; overflow-wrap: anywhere; }
.vehicle-timeline .text-link { display: inline-block; padding-block: 10px; }
.rule-lab { margin-top: 24px; }
.rule-lab > .card { margin-bottom: 22px; }
.lab-intro { border-left: 3px solid #72edf2; }
.lab-comparison { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.lab-decision { border-top: 3px solid #72edf2; }
.lab-decision[data-decision="blocked"] { border-top-color: #f4959a; }
.lab-decision[data-decision="review"] { border-top-color: #ffd287; }
.lab-decision h4 { font-size: 1.65rem; margin: 12px 0; }
.lab-decision dd { overflow-wrap: anywhere; }
.lab-explanation { margin-top: 20px; }
.lab-explanation summary { color: #8cecf3; font-weight: 600; }
.lab-explanation li { margin-block: 10px; font-size: .84rem; }
.rule-lab select:disabled { color: #d3e6f4; opacity: .85; }
#lab-result:empty { display: none; }
@media (max-width: 1000px) { .insight-chart-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .insight-filters { gap: 12px; }
  .insight-filters .form-field { flex-basis: 100%; }
  .insight-filters > .btn { width: 100%; }
  .history-summary { grid-template-columns: minmax(0, 1fr); }
  .history-summary > img { height: 180px; }
  .insights-view .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .insights-view .insight-metric { padding: 16px; }
  .insight-metric .kpi-label { min-height: 4.2em; }
  .vehicle-timeline > li { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .insights-view *, .rule-lab * { scroll-behavior: auto; transition: none; } }
