/* Only the active agenda fills the viewport. Other sections keep normal page scrolling. */
.agenda-summary .metric-short { display:none; }
.agenda-guide-trigger { display:inline-flex; align-items:center; justify-content:center; gap:6px; align-self:center; min-width:48px; min-height:48px; padding:6px 12px; border:1px solid #d1e2dc; border-radius:12px; color:#185952; background:white; font-weight:650; cursor:pointer; }
.agenda-guide-trigger:hover { background:#edf7f3; }
.agenda-guide-trigger:focus-visible,.agenda-toast button:focus-visible { outline:3px solid #327c73; outline-offset:2px; }
.agenda-guide { box-sizing:border-box; width:min(390px,calc(100% - 24px)); max-height:80dvh; overflow:auto; overscroll-behavior:contain; margin:auto; padding:20px; border:1px solid #d1e2dc; border-radius:18px; color:#25423c; background:white; box-shadow:0 12px 48px #13342f33; font-size:14px; line-height:1.5; }
.agenda-guide::backdrop { background:#132e302e; }
.agenda-guide header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.agenda-guide h2 { margin:0; font-size:20px; }
.agenda-guide h3 { margin:16px 0 4px; font-size:14px; }
.agenda-guide p { margin:4px 0; }
.guide-legend,.guide-legend > span { display:flex; align-items:center; gap:6px; }
.guide-legend { flex-wrap:wrap; gap:4px 12px; }
.agenda-feedback { position:fixed; inset:auto max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) auto; z-index:12; max-width:min(26rem,calc(100% - 24px)); pointer-events:none; }
.agenda-toast { display:flex; align-items:center; gap:9px; padding:4px 5px 4px 14px; border:1px solid #bbdbcf; border-radius:14px; background:#f0faf5; color:#17483d; box-shadow:0 4px 18px #153f3529; font-size:14px; line-height:1.4; pointer-events:auto; }
.agenda-toast svg { flex:none; }
.agenda-toast button { flex:none; width:44px; min-height:44px; padding:0; border:0; background:transparent; color:inherit; cursor:pointer; font-size:22px; }
.calendar-cell.half-hour-cell { min-height:52px; padding-block:2px; }
.time-label.half-hour-label { min-height:52px; padding-top:8px; }
.agenda-colors-trigger { width:48px; padding:10px; flex:none; }
.agenda-colors { width:min(620px,calc(100vw - 24px)); padding:24px; }
.agenda-colors .editor-heading h2 { font-size:24px; }
.agenda-colors .editor-heading { gap:12px; }
.agenda-color-people { display:grid; gap:8px; margin-block:18px; }
.agenda-color-people > button { justify-content:flex-start; min-height:64px; }
.agenda-color-people i { width:28px; height:28px; border-radius:50%; flex:none; }
.agenda-color-people svg { margin-left:auto; }
.agenda-colors .service-custom-color { display:flex; align-items:center; gap:16px; margin:14px 0; }
.agenda-colors input[type=color] { width:64px; min-height:48px; padding:4px; }
.agenda-colors .form-actions { margin-top:18px; }
.calendar-date-choice { position:relative; display:flex; align-items:center; gap:10px; min-height:48px; padding:5px 9px; margin:0; border:1px solid transparent; border-radius:10px; cursor:pointer; transition:background .15s,border-color .15s; }
.calendar-date-choice:hover { background:#edf7f3; border-color:#d2e6de; }
.calendar-date-choice:focus-within { outline:3px solid #6ac9b3; outline-offset:2px; background:#edf7f3; }
.calendar-date-choice:has(input:disabled) { opacity:.65; cursor:wait; }
.calendar-date-copy { display:flex; flex-direction:column; gap:3px; min-width:0; }
.calendar-local-name { color:#59776d; font-size:11px; font-weight:600; line-height:1.2; overflow-wrap:anywhere; }
.calendar-range { line-height:1.25; }
.calendar-date-choice > svg { width:19px; height:19px; color:#19766e; flex:none; }
.calendar-date-choice > .calendar-date-input { position:absolute; inset:0; width:100%; height:100%; margin:0; min-width:0; min-height:48px; opacity:0; cursor:pointer; }
.calendar-toolbar-actions { display:flex; align-items:center; gap:8px; flex:none; }
.calendar-view-picker { display:none; }
.calendar-toolbar-actions .primary { white-space:nowrap; }
.calendar-site-selector:empty { display:none; }
.calendar-site-selector:not(:empty) { flex:0 0 100%; }
.calendar-site-selector label { display:flex; align-items:center; gap:10px; margin:0; font-size:12px; }
.calendar-site-selector select { width:auto; max-width:100%; min-width:160px; }
body:has(.agenda-workspace) { height:100dvh; display:flex; flex-direction:column; overflow:hidden; }
.account-workspace.agenda-workspace { flex:1; width:100%; min-height:0; grid-template-rows:minmax(0,1fr); overflow:hidden; }
.agenda-workspace > .workspace-navigation { height:100%; min-height:0; padding-top:20px; }
.agenda-workspace .workspace-navigation-links { min-height:calc(100% - 92px); }
.agenda-workspace > .workspace-navigation, .agenda-workspace > main { grid-row:1; }
.account-workspace.agenda-workspace > main { display:flex; flex-direction:column; min-height:0; padding:12px 20px 8px!important; overflow:auto; }
.agenda-workspace > main > * { flex-shrink:0; }
.account-workspace.agenda-workspace .account-controls { margin:0 0 10px; padding:0; gap:10px; }
.agenda-workspace .workspace-local { gap:2px; }
.agenda-workspace .workspace-local .eyebrow { font-size:9px; letter-spacing:1.5px; margin:0; }
.agenda-workspace .workspace-local > strong { font-size:16px; }
.agenda-workspace .agenda-summary { flex:none; grid-template-columns:minmax(0,1fr) minmax(0,.8fr) minmax(0,1.5fr) auto; margin:0 0 8px; gap:8px; }
.agenda-workspace .agenda-summary article { grid-template-columns:auto minmax(0,1fr); grid-template-rows:auto auto; column-gap:12px; row-gap:3px; align-content:center; padding:10px 14px; border-radius:12px; }
.agenda-workspace .agenda-summary article > strong { grid-column:1; grid-row:1/3; align-self:center; font-size:26px; line-height:1; }
.agenda-workspace .agenda-summary article > span { grid-column:2; grid-row:1; font-size:12px; }
.agenda-workspace .agenda-summary article > small { grid-column:2; grid-row:2; font-size:10px; line-height:1.3; }
.agenda-workspace .calendar-panel { flex:1 1 0; display:flex; flex-direction:column; min-height:260px; border-radius:16px; }
.agenda-workspace .calendar-toolbar { flex:none; padding:8px 14px; gap:10px; flex-wrap:wrap; }
.agenda-workspace .calendar-heading { flex:1; min-width:0; }
.agenda-workspace .calendar-heading .mini-eyebrow { display:none; }
.agenda-workspace .calendar-heading h2 { font-size:18px; margin:0; }
.agenda-workspace .calendar-controls { gap:8px; }
.agenda-workspace .calendar-controls .secondary { padding-inline:14px; }
.agenda-workspace .calendar-controls select { width:auto; max-width:210px; }
.agenda-workspace .calendar-toolbar-actions .primary { padding-inline:16px; }
.agenda-workspace .calendar-toolbar-actions .workspace-refresh { width:48px; padding:12px; }
.account-workspace.agenda-workspace .calendar-scroll { flex:1 1 0; min-height:0; max-height:none; overflow-y:auto; overscroll-behavior-y:contain; scrollbar-gutter:stable; }
.agenda-workspace .day-heading,.agenda-workspace .time-heading { min-height:58px; padding:5px 3px; }
.agenda-workspace .day-heading { display:grid; grid-template-columns:auto auto; grid-template-rows:auto auto; justify-content:center; gap:0 7px; }
.agenda-workspace .day-heading > span { grid-column:1; grid-row:1; align-self:end; }
.agenda-workspace .day-heading > strong { grid-column:2; grid-row:1/3; font-size:22px; width:32px; height:32px; align-self:center; }
.agenda-workspace .day-heading > small { grid-column:1; grid-row:2; align-self:start; font-size:8px; }
.agenda-workspace .time-heading { display:grid; place-items:center; }
.agenda-workspace .calendar-bottom { flex:none; padding:5px 12px; min-height:28px; }
.account-workspace.agenda-workspace > .account-footer { display:none; }
.agenda-workspace .account-status { margin:6px 0 0; padding:10px 14px; }
.agenda-workspace .demo-footer { max-width:none; width:100%; margin:6px 0 0!important; padding:4px 0 0; border:0; font-size:10px; gap:12px; }
.agenda-workspace .demo-footer a { min-height:32px; }
@media (max-width:1250px) {
  .agenda-workspace .calendar-toolbar { flex-wrap:wrap; }
  .agenda-workspace .calendar-heading { flex:1; order:1; }
  .agenda-workspace .calendar-toolbar-actions { order:2; }
  .agenda-workspace .calendar-controls { order:3; width:100%; justify-content:space-between; }
  .agenda-workspace .calendar-site-selector { order:0; }
  .agenda-workspace .agenda-summary article { padding:9px 10px; column-gap:8px; }
}
@media (max-width:760px) {
  .account-workspace.agenda-workspace { display:flex; flex-direction:column; }
  .agenda-workspace > .workspace-navigation { flex:none; height:auto; position:relative; overflow:visible; padding:4px 12px; z-index:10; }
  .agenda-workspace .workspace-navigation .brand { margin:0; }
  .agenda-workspace .workspace-navigation-links { min-height:0; }
  .agenda-workspace .workspace-navigation-links.is-open { position:absolute; top:100%; left:0; width:100%; max-height:70dvh; overflow-y:auto; background:#102845; padding:12px 16px; box-shadow:0 18px 30px #10284530; }
  .account-workspace.agenda-workspace > main { flex:1; padding:10px 10px 6px!important; }
  .account-workspace.agenda-workspace .account-controls { gap:7px; margin-bottom:8px; }
  .agenda-workspace .workspace-local { flex:1; flex-basis:auto; }
  .agenda-workspace .workspace-refresh { display:none; }
  .agenda-workspace .agenda-summary { grid-template-columns:repeat(3,minmax(0,1fr)) 48px; align-items:center; gap:0; margin-bottom:6px; background:#fff; border:1px solid #d5e3dd; border-radius:12px; }
  .agenda-workspace .agenda-summary article { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:center; gap:0 5px; padding:0 3px; min-width:0; background:transparent; border:0; border-right:1px solid #d5e3dd; border-radius:0; }
  .agenda-workspace .agenda-summary article > strong { order:-1; font-size:18px; align-self:auto; }
  .agenda-workspace .agenda-summary article .metric-full { display:none; }
  .agenda-workspace .agenda-summary article .metric-short { display:inline; font-size:11px; line-height:1.3; }
  .agenda-guide-trigger { padding:0; border:0; background:transparent; }
  .agenda-guide-trigger span { display:none; }
  .agenda-feedback { left:max(12px,env(safe-area-inset-left)); margin-inline:auto; width:fit-content; }
  .agenda-workspace .agenda-summary article > small { display:none; }
  .agenda-workspace .calendar-toolbar { padding:8px; gap:6px; }
  .agenda-workspace .calendar-heading { flex:1 1 0; }
  .agenda-workspace .calendar-heading h2 { font-size:15px; }
  .agenda-workspace .calendar-date-choice { padding:3px; gap:6px; }
  .agenda-workspace .calendar-date-choice > svg { width:17px; height:17px; }
  .agenda-workspace .calendar-local-name { font-size:10px; }
  .agenda-workspace .calendar-toolbar-actions .primary { min-height:48px; padding:10px 12px; font-size:12px; }
  .agenda-workspace .calendar-controls { width:100%; gap:4px; justify-content:flex-start; flex-wrap:nowrap; }
  .agenda-workspace .calendar-controls .secondary { padding-inline:8px; }
  .agenda-workspace .calendar-controls .navigation-buttons { gap:3px; }
  .agenda-workspace .calendar-controls .segmented { gap:0; }
  .agenda-workspace .calendar-controls .navigation-buttons,.agenda-workspace .calendar-controls .segmented { flex:none; }
  .agenda-workspace .calendar-controls select { flex:1 1 0; width:0; min-width:70px; max-width:none; padding-inline:5px; text-overflow:ellipsis; }
  .agenda-workspace .calendar-bottom { display:block; padding:5px 8px; }
  .agenda-workspace .calendar-bottom > span:last-child { display:none; }
  .agenda-workspace .day-heading { display:flex; flex-direction:column; gap:1px; }
  .agenda-workspace .day-heading > strong { font-size:17px; width:25px; height:25px; }
  .agenda-workspace .day-heading > span,.agenda-workspace .day-heading > small { align-self:center; }
  .agenda-workspace .day-heading > small { font-size:7px; }
  .agenda-workspace .demo-footer { display:block; font-size:9px; }
  .agenda-workspace .demo-footer > a { display:none; }
  .account-workspace.agenda-workspace > .account-footer { padding:3px 10px; font-size:8px; }
}
/* Short windows / zoom: keep every control reachable instead of clipping the agenda. */
.calendar-grid.two-grid { grid-template-columns:58px repeat(2,minmax(0,1fr)); }
.calendar-grid.three-grid { grid-template-columns:58px repeat(3,minmax(0,1fr)); }
.calendar-month { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; padding:6px 12px 12px; }
.month-weekday { text-align:center; color:#537068; font-weight:650; font-size:12px; }
.month-day { display:flex; flex-direction:column; justify-content:space-between; align-items:flex-start; min-height:64px; gap:5px; padding:7px; border:1px solid #d8e5df; border-radius:9px; background:#fbfdfc; color:#1c4038; cursor:pointer; }
.month-day:hover,.month-day:focus-visible { background:#edf7f3; border-color:#438777; }
.month-day.is-today { border:2px solid #187568; background:#edf8f4; }
.month-day strong { font-size:15px; }
.month-count { color:#15594e; background:#d9f0e8; border-radius:5px; padding:2px 5px; font-weight:650; font-size:12px; }
.month-empty { color:#71817c; }
@media (width > 760px) {
  .calendar-views .short-view:not(.active) { display:none; }
  /* The scroll pane already accounts for the toolbar. Share its remaining height
     between the actual weeks (4–6), but allow scrolling if the text needs it. */
  .agenda-workspace .calendar-month { box-sizing:border-box; min-height:100%; grid-template-rows:max-content; grid-auto-rows:minmax(max-content,1fr); }
  .agenda-workspace .month-day { min-height:44px; padding-block:clamp(4px,.8vh,8px); gap:2px; }
}
@media (max-width:760px) {
  .agenda-workspace .calendar-controls { display:grid; grid-template-columns:auto max-content minmax(0,1fr); align-items:center; gap:clamp(3px,1vw,8px); }
  .agenda-workspace .calendar-views { display:none; }
  .agenda-workspace .calendar-controls select { width:100%; min-width:0; min-height:44px; }
  .agenda-workspace .calendar-controls .calendar-view-picker { display:block; width:auto; color:#18594f; background-color:#eef7f3; border:1px solid #b7d6cb; border-radius:10px; font-weight:600; padding-inline:7px 2px; }
  .agenda-workspace .calendar-view-picker:focus-visible { outline:2px solid #187568; outline-offset:2px; }
  .agenda-workspace .time-label.half-hour-label { color:#566b62; font-size:10px; font-weight:500; font-variant-numeric:tabular-nums; }
  .calendar-grid.two-grid { grid-template-columns:38px repeat(2,minmax(0,1fr)); }
  .calendar-grid.three-grid { grid-template-columns:38px repeat(3,minmax(0,1fr)); }
  .calendar-month { gap:2px; padding:4px; }
  .month-day { align-items:center; min-height:50px; padding:4px 1px; gap:2px; }
  .month-count { padding:1px 2px; font-size:10px; }
}
@media (max-height:650px) {
  body:has(.agenda-workspace) { height:auto; min-height:100dvh; overflow:auto; }
  .account-workspace.agenda-workspace { min-height:100dvh; overflow:visible; }
  .agenda-workspace > .workspace-navigation { height:100dvh; position:sticky; }
  .account-workspace.agenda-workspace > main { overflow:visible; }
  .agenda-workspace .calendar-panel { flex:none; height:70dvh; min-height:360px; }
  @media (max-width:760px) { .agenda-workspace > .workspace-navigation { height:auto; position:relative; } }
}
