/* Триггеры погоды и событий: бюджеты и цели меняются по прогнозу погоды и календарю. */
.xwt { grid-template-columns: minmax(0, 1fr); }
.xwt > *, .xwt-cal > * { min-width: 0; }
.xwt-head { justify-content: space-between; align-items: flex-start; gap: 12px; }
.xwt-head-txt { flex: 1; min-width: 240px; display: grid; gap: 4px; }
.xwt-rules td { vertical-align: top; }
.xwt-rules .chip .i, .xwt-rules .sub .i { width: 13px; height: 13px; }
.xwt-cal { align-items: start; }
.xwt-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; max-height: 260px; overflow-y: auto; padding: 2px; }
.xwt-cond select { flex: 1 1 170px; }
.xwt-cond input { flex: 0 1 110px; }
.xwt-x { border: 0; background: none; padding: 0 0 0 4px; color: inherit; cursor: pointer; display: inline-flex; }
.xwt-x .i { width: 12px; height: 12px; }
.xwt-x:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }

/* forecast charts: one accent colour, comparison grey dashed, no second Y axis */
.xwt-chart { position: relative; }
.xwt-chart svg { width: 100%; height: 150px; display: block; touch-action: pan-y; }
.xwt-chart text { font-size: 11px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.xwt-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.xwt-past { fill: var(--sidebar); }
.xwt-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.xwt-line.main { stroke: var(--brand); }
.xwt-line.cmp { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 4 4; }
.xwt-bar { fill: var(--brand); opacity: .75; }
.xwt-ok { fill: var(--ok); }
.xwt-today { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.xwt-chart .cross { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.xwt-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.xwt-key { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--brand); margin-right: -6px; vertical-align: middle; }
.xwt-key.dash { border-top: 2px dashed var(--ink-3); }
.xwt-key.ok { width: 8px; border-top: 3px solid var(--ok); border-radius: 2px; }
tr.xwt-now td { background: var(--brand-soft); }
tr.xwt-was td { color: var(--ink-2); }

/* last week: one cell per day */
.xwt-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.xwt-wd { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px; display: grid; gap: 2px; text-align: center; background: var(--surface); font-variant-numeric: tabular-nums; }
.xwt-wd.on { border-color: color-mix(in oklch, var(--brand) 45%, var(--line)); background: var(--brand-soft); color: var(--brand-ink); }
.xwt-wd .i { width: 12px; height: 12px; vertical-align: -2px; }

@media (max-width: 640px) {
  .xwt-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .xwt-chart svg { height: 120px; }
}
