/* #1234 — C2-A spatial month, progressive enhancement over canonical day_views. */
/* #1276: query the actual matrix compartment, never the viewport width. */
.b2-c2 { display:grid; grid-template-columns:minmax(0,1fr); min-width:0; gap:12px; color:var(--color-ink,#162b48); container-type:inline-size; }
.b2-c2 *, .b2-c2 *::before, .b2-c2 *::after { box-sizing:border-box; }
.b2-c2-intro, .b2-c2-legend { margin:0; font-size:12px; color:var(--color-muted,#5d718e); line-height:1.5; }
.b2-c2-warning { padding:9px 12px; margin:0; background:var(--color-brand-soft,#edf3ff); border:1px solid var(--color-line,#d5dfef); border-radius:9px; font-size:12px; }
.b2-c2-scroll-hint { margin:0; font-size:11px; font-weight:700; color:var(--color-brand-strong,#224ca8); }
/* The 535px grid + 8px inline padding + 2px borders fits at 545px.
   A contained width query also honors B sidebar and real 200% browser zoom. */
@container (min-width: 545px) { .b2-c2-scroll-hint { display:none; } }
.b2-c2-scroll { width:100%; max-width:100%; min-width:0; contain:paint; overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-width:auto; padding:8px 4px 14px; border:1px solid var(--color-line,#d5dfef); border-radius:12px; background:var(--color-surface,#fff); }
.b2-c2-grid { min-width:535px; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
.b2-c2-weekday { text-align:center; font-size:11px; font-weight:700; color:var(--color-muted,#5d718e); }
.b2-c2-cell { display:flex; flex-direction:column; align-items:center; min-width:0; min-height:73px; padding:5px 2px; border:1px solid var(--color-line,#d5dfef); border-radius:8px; background:var(--color-surface,#fff); color:var(--color-ink,#162b48); text-decoration:none; gap:4px; }
a.b2-c2-cell:hover,a.b2-c2-cell.is-selected { border-color:var(--color-brand,#345bd6); background:var(--color-brand-soft,#edf3ff); }
.b2-c2-cell.is-unloaded { color:var(--color-muted,#5d718e); border-style:dashed; background:var(--color-canvas,#f5f8fe); }
.b2-c2-date { font-size:13px; font-weight:800; }
.b2-c2-count,.b2-c2-outside { font-size:9px; color:var(--color-muted,#5d718e); text-align:center; overflow-wrap:anywhere; }
.b2-c2-markers { display:flex; justify-content:center; gap:3px; flex-wrap:wrap; }
.b2-c2-marker { width:7px; height:7px; background:var(--calendar-color,#345bd6); border-radius:50%; }
.b2-c2-marker.is-visible-only { outline:1px dashed var(--color-ink,#162b48); outline-offset:1px; }
.b2-c2-marker.is-more { background:var(--color-muted,#5d718e); }
.b2-c2-selection { display:grid; gap:10px; min-width:0; padding:12px; border:1px solid var(--color-line,#d5dfef); border-radius:12px; scroll-margin-block-start:20px; }
.b2-c2-selection:target { outline:2px solid var(--color-brand,#345bd6); outline-offset:2px; }
.b2-c2-selection-header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; }
.b2-c2-selection-header h4 { margin:0; font-size:14px; }
.b2-c2-selection-header span { display:block; font-size:11px; color:var(--color-muted,#5d718e); }
.b2-c2-selection-header a { font-size:12px; font-weight:700; color:var(--color-brand-strong,#224ca8); }
.b2-c2-events { display:grid; gap:8px; list-style:none; padding:0; margin:0; }
.b2-c2-events li { min-width:0; }
.b2-c2-event { display:grid; grid-template-columns:minmax(78px,110px) minmax(0,1fr); gap:8px; min-width:0; padding:10px; border:1px solid var(--color-line,#d5dfef); border-left:4px solid var(--calendar-accent,var(--calendar-color,#345bd6)); border-radius:9px; text-decoration:none; color:var(--color-ink,#162b48); background:color-mix(in srgb,var(--calendar-color,#345bd6) 5%,var(--color-surface,#fff)); }
.b2-c2-event.is-visible-only { border-left-style:dashed; }
.b2-c2-event.is-selected,.b2-c2-event:hover { border-color:var(--color-brand,#345bd6); }
.b2-c2-time { overflow-wrap:anywhere; font-size:11px; font-weight:700; }
.b2-c2-description { min-width:0; overflow-wrap:anywhere; }
.b2-c2-description strong { display:block; font-size:12px; white-space:normal; overflow-wrap:anywhere; }
.b2-c2-description small { display:block; margin-top:5px; font-size:11px; color:var(--color-muted,#5d718e); overflow-wrap:anywhere; }
.b2-c2-empty { margin:0; font-size:12px; color:var(--color-muted,#5d718e); }
.b2-c2-reading-switch { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 12px; }
.b2-c2-reading-switch a { padding:8px 11px; min-height:36px; display:inline-flex; align-items:center; border:1px solid var(--color-line,#d5dfef); border-radius:9px; text-decoration:none; font-size:12px; font-weight:700; color:var(--color-ink,#162b48); }
.b2-c2-reading-switch a[aria-current="page"] { border-color:var(--color-brand,#345bd6); background:var(--color-brand-soft,#edf3ff); }
.b2-c2 a:focus-visible,.b2-c2-scroll:focus-visible,.b2-c2-reading-switch a:focus-visible { outline:3px solid var(--color-brand,#345bd6); outline-offset:2px; }
@media(max-width:580px) { .b2-c2-selection { padding:8px; } .b2-c2-event { grid-template-columns:minmax(70px,90px) minmax(0,1fr); padding:8px; } .b2-c2-scroll { padding:6px 3px 12px; } }
@media(forced-colors:active) { .b2-c2-cell,.b2-c2-event { border:1px solid CanvasText; } .b2-c2-marker { background:Highlight; } .b2-c2-scroll { border:1px solid CanvasText; } }
