/* SAPAWOO Insights · calendar and weather context under the daily charts (Claude Design r6, 05.10.2026)
   Scoped: everything lives under .cx-* inside .r1 (page) or .r1dr (quick glance). Palette and target sizes are the
   cockpit's own variables (cockpit-r1.css); nothing is loaded from elsewhere.
   The band repeats the column geometry of the chart above it (.r1-collabs): same gutter, same gap, same minimum
   width — so a cell sits exactly under its day. Phone < 600, tablet 600–1099, desktop ≥ 1100. */

/* ---------------------------------------------------------------- the band */
.cx-band{position:relative;display:flex;gap:var(--colgap,14px);margin:6px 0 0 34px;padding:0 6px;min-width:var(--tw,0)}
/* A cell is a 44px touch target and takes touch like the bars above it: no touch-action of its own, so a dense
   month or quarter still pans sideways inside the chart's scroller and the page still scrolls. */
.cx-band button{flex:1 1 0;min-width:0;min-height:44px;border:0;border-radius:4px;background:transparent;padding:2px 0 0;cursor:pointer;display:flex;
  flex-direction:column;gap:3px;font:inherit;color:var(--ink);-webkit-tap-highlight-color:transparent}
.cx-band button:hover{background:var(--mist)}
.cx-band button[aria-pressed="true"],.cx-band button[aria-current]{background:color-mix(in srgb,var(--or) 22%,var(--w))}
.cx-band button:focus-visible{outline:2px solid var(--or);outline-offset:1px}
.cx-band.old{opacity:.75}
.cx-lab{position:absolute;left:0;width:28px;margin-left:-34px;text-align:right;font:700 9.5px/12px 'Manrope',sans-serif;color:var(--teal)}
.cx-lab.h{top:2px} .cx-lab.r{top:calc(10px + var(--cxn,1) * 5px)} .cx-lab.r.solo{top:8px}
/* one thin row per selected calendar: solid = public holiday, tinted = school break, hollow = make-up working day
   (not a holiday), dotted hairline = no coverage */
.cx-h{display:flex;flex-direction:column;gap:1px;padding:0 1px}
.cx-h i{display:block;height:4px;border-radius:1px}
.cx-band i.p,.cx-ctl i.p,.cx-det i.p,.cx-fc i.p{background:var(--cxc)}
.cx-band i.s,.cx-leg i.s{background:color-mix(in srgb,var(--cxc,#B8860B) 32%,var(--w));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--cxc,#B8860B) 55%,var(--w))}
.cx-band i.w,.cx-leg i.w{background:none;box-sizing:border-box;border:1px solid var(--ink)}
.cx-band i.u,.cx-leg i.u{height:0;margin:1.5px 0 2.5px;border-top:1px dotted var(--mid);border-radius:0;background:none}
/* Calendars: six distinct warm hues, one per selected calendar (the dot on its chip). Never teal, ink or grey-blue —
   teal is rain and nothing else, so a holiday row cannot be read as rain. */
.cx-band .c0,.cx-ctl .c0,.cx-det .c0,.cx-fc .c0,.cx-highlights .c0{--cxc:#F26A3D}
.cx-band .c1,.cx-ctl .c1,.cx-det .c1,.cx-fc .c1,.cx-highlights .c1{--cxc:#B8860B}
.cx-band .c2,.cx-ctl .c2,.cx-det .c2,.cx-fc .c2,.cx-highlights .c2{--cxc:#7A3B69}
.cx-band .c3,.cx-ctl .c3,.cx-det .c3,.cx-fc .c3,.cx-highlights .c3{--cxc:#9C3D1F}
.cx-band .c4,.cx-ctl .c4,.cx-det .c4,.cx-fc .c4,.cx-highlights .c4{--cxc:#D4577E}
.cx-band .c5,.cx-ctl .c5,.cx-det .c5,.cx-fc .c5,.cx-highlights .c5{--cxc:#8A63B8}
/* rain of the day: a bar on a baseline. No bar = estimated zero; dashed outline = no full estimate (unknown). */
.cx-r{position:relative;display:block;height:20px;margin:0 1px;border-bottom:1px solid var(--line)}
.cx-r i{position:absolute;left:18%;right:18%;bottom:0;background:var(--teal);border-radius:1px 1px 0 0}
.cx-r i.u{top:6px;left:12%;right:12%;background:transparent;border:1.5px dashed var(--mid);border-bottom:0}
.cx-t{font:600 9.5px/1 'Manrope',sans-serif;text-align:center;white-space:nowrap;overflow:hidden;min-height:10px;font-variant-numeric:tabular-nums}
/* inside the quick glance the band follows the bars of the dialog */
.cx-band.gl{gap:4px;margin:2px 0 0;padding:0;min-width:0}
.cx-band.gl .cx-r{height:14px}

/* ---------------------------------------------------------------- controls, legend, sources */
.cx-ctl{display:flex;flex-wrap:wrap;gap:4px 6px;align-items:center;font:600 12px/1.4 'Manrope',sans-serif}
.cx-ctl.off{color:var(--teal);gap:4px 10px}
.cx-cap{font:800 10.5px 'Manrope',sans-serif;letter-spacing:.08em;color:var(--teal);margin-right:2px}
.cx-chip{border:1px solid var(--line);border-radius:999px;background:var(--w);min-height:44px;padding:0 12px;cursor:pointer;
  font:700 12px 'Manrope',sans-serif;color:var(--ink);display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.cx-chip[aria-pressed="true"]{border-color:var(--ink);background:var(--mist)}
.cx-chip.add{border-style:dashed;border-color:var(--mid)}
.cx-chip.gone{border-style:dashed}
.cx-chip.opt{flex-direction:column;align-items:flex-start;gap:0;padding:4px 12px;white-space:normal;text-align:left}
.cx-chip small{font:500 10.5px/1.2 'Manrope',sans-serif;color:var(--teal)}
.cx-chip:disabled{opacity:.4;cursor:default}
.cx-chip i.r,.cx-leg i.r,.cx-det i.r{display:inline-block;width:10px;height:10px;border-radius:2px;background:var(--teal);flex:none}
.cx-chip:focus-visible,.cx-link:focus-visible,.cx-fday:focus-visible{outline:2px solid var(--or);outline-offset:2px}
.cx-link{border:0;background:none;min-height:44px;padding:0 6px;cursor:pointer;font:800 12px 'Manrope',sans-serif;
  text-decoration:underline;text-underline-offset:3px;color:var(--ink)}
.cx-pick{border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:6px}
.cx-chips{display:flex;flex-wrap:wrap;gap:6px}
.cx-sub{font:600 12px/1.4 'Manrope',sans-serif;color:var(--teal)}
.cx-leg{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center;font:600 11px 'Manrope',sans-serif}
.cx-leg span{display:inline-flex;align-items:center;gap:5px}
.cx-leg i{display:inline-block;width:12px;height:5px;border-radius:1px;flex:none}
.cx-ctl i.p,.cx-det i.p,.cx-fc i.p{display:inline-block;width:10px;height:10px;border-radius:2px;flex:none}
.cx-leg i.hol{background:linear-gradient(90deg,#F26A3D 0 34%,#B8860B 34% 67%,#7A3B69 67%)}
.cx-src a{color:var(--ink);font-weight:700;text-underline-offset:3px}
.cx-leg i.r{height:9px}
.cx-leg i.ru{height:9px;border:1.5px dashed var(--mid);border-radius:1px;box-sizing:border-box}
.cx-src{background:var(--mist);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:5px;font:500 12px/1.45 'Manrope',sans-serif}
.cx-src b{font-weight:800}
.cx-cov{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 16px;padding-left:10px}

/* ---------------------------------------------------------------- the selected day, in place */
.cx-det{border-top:1px solid var(--line);padding-top:8px;display:flex;flex-direction:column;gap:5px;font:500 12px/1.4 'Manrope',sans-serif;min-width:0}
.cx-det>b{font:800 12.5px/1.35 'Manrope',sans-serif}
.cx-det>span{display:flex;gap:6px;align-items:flex-start}
.cx-det>span i{margin-top:3px}
.cx-det small{font:500 11.5px/1.4 'Manrope',sans-serif;color:var(--teal)}
/* the quick glance: one sentence under the mini chart, nothing more */
.cx-det.c{display:block;border-top:0;padding-top:0}
.cx-det.c>b{margin-right:4px}
.cx-hrs{display:grid;grid-template-columns:repeat(24,minmax(0,1fr));gap:1px}
.cx-hrs>span{display:flex;flex-direction:column;align-items:stretch;gap:2px;min-width:0}
.cx-hrs .b{position:relative;display:block;height:28px;background:var(--w);border-radius:2px}
.cx-hrs .b i{position:absolute;left:15%;right:15%;bottom:0;background:var(--teal)}
.cx-hrs .b i.u{top:6px;background:transparent;border:1px dashed var(--mid);border-bottom:0}
.cx-hrs em,.cx-hrs b{font:600 9.5px/1 'Manrope',sans-serif;font-style:normal;text-align:center;min-height:10px;white-space:nowrap;overflow:visible}
.cx-hrs b{font-weight:800;color:var(--teal)}
.r1dr.glance .cx-det{background:var(--w);border:0;border-radius:10px;padding:10px 12px}
.r1dr.glance .cx-hrs .b{background:var(--mist)}

/* ---------------------------------------------------------------- Operations: forecast, apart from results */
.cx-tag{display:inline-block;vertical-align:middle;font:800 10px 'Manrope',sans-serif;letter-spacing:.08em;text-transform:uppercase;
  border:1.5px dashed var(--teal);border-radius:999px;padding:2px 8px;margin-left:6px}
.cx-fcd{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.cx-fday{border:1px solid var(--line);background:var(--w);border-radius:12px;padding:8px 10px;min-height:44px;cursor:pointer;text-align:left;
  display:flex;flex-direction:column;gap:5px;font:inherit;color:var(--ink);min-width:0}
.cx-fday[aria-pressed="true"]{border:2px solid var(--ink);background:var(--mist);padding:7px 9px}
.cx-fday>b{font:800 12.5px 'Manrope',sans-serif}
.cx-fday .hol{display:flex;flex-direction:column;gap:2px;min-height:12px;font:600 10.5px/1.25 'Manrope',sans-serif}
.cx-fday .hol span{display:flex;gap:4px;align-items:flex-start}
.cx-fday .hol i{width:8px;height:8px;margin-top:2px}
.cx-fday .rain{display:flex;align-items:flex-end;gap:6px}
.cx-fday .rain .b{position:relative;display:block;width:14px;height:30px;border-bottom:1px solid var(--line);flex:none}
/* hatched = forecast: never the solid fill of the historical estimate */
.cx-fday .rain .b i{position:absolute;left:0;right:0;bottom:0;box-sizing:border-box;border:1px solid var(--teal);
  background:repeating-linear-gradient(135deg,var(--teal) 0 3px,var(--w) 3px 5px)}
.cx-fday .rain .b i.u{top:6px;border:1.5px dashed var(--mid);border-bottom:0;background:transparent}
.cx-fday .rain>span:last-child{display:flex;flex-direction:column;min-width:0}
.cx-fday strong{font:800 13px 'Manrope',sans-serif;font-variant-numeric:tabular-nums}
.cx-fday small{font:600 10.5px/1.25 'Manrope',sans-serif;color:var(--teal)}
.cx-fday .t{font:700 11.5px 'Manrope',sans-serif}
.cx-fdet{border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:6px;font:500 12px/1.4 'Manrope',sans-serif}
.cx-fdet>b{font:800 12.5px 'Manrope',sans-serif}
.cx-fdet small{color:var(--teal)}
.cx-ivs{display:flex;flex-wrap:wrap;gap:4px 6px}
.cx-ivs span{display:flex;flex-direction:column;gap:1px;background:var(--mist);border-radius:6px;padding:3px 6px;font:600 10.5px/1.2 'Manrope',sans-serif;
  font-variant-numeric:tabular-nums}
.cx-ivs b{font-weight:800;color:var(--teal)}

@media (max-width:1099px){ .cx-fcd{grid-template-columns:repeat(4,minmax(0,1fr))} }
@media (max-width:599px){
  .cx-band{--colgap:6px}
  .cx-fcd{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cx-cov{grid-template-columns:minmax(0,1fr)}
  .cx-hrs em{font-size:8.5px}
}
@media (prefers-reduced-motion:no-preference){
  .cx-band button,.cx-chip,.cx-fday{transition:background-color .15s ease}
}

/* Context explanations precede optional controls, including on narrow screens. */
.cx-highlights{display:grid;gap:8px;margin:16px 0;font-size:14px;line-height:1.5}
.cx-highlights>span{display:block}.cx-highlights i{display:inline-block;width:10px;height:10px;margin-right:8px;border-radius:2px}
.cx-adjust{margin:12px 0}.cx-adjust>summary{cursor:pointer;font-size:14px;font-weight:600;padding:12px 0}
@media(max-width:600px){.cx-highlights,.cx-adjust>summary{font-size:16px}}

.cx-highlights i.p{background:var(--cxc)}
