/* css/ascent-calendar.css -- the shared calendar (js/shared/ascent-calendar.js),
   2026-11-16. Option B from the Calendar mockups: week with times + a
   "Needs you" column, plus Month and List. Kind colors arrive as --k (text /
   ring) and --kb (tint) on each item. */

.acal { font-family: 'Inter', system-ui, sans-serif; color: var(--ink); }
.acal button { font-family: inherit; line-height: inherit; }

/* ── top bar ─────────────────────────────────────────────────── */
.acal-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.acal-nav { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
.acal-iconbtn, .acal-btn { height: 34px; border: 1px solid var(--light-gray); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.acal-iconbtn { width: 34px; padding: 0; font-size: 16px; }
.acal-btn { padding: 0 12px; font-size: 14px; font-weight: 600; }
.acal-iconbtn:hover, .acal-btn:hover { border-color: var(--coral-200); }
.acal-range { margin: 0 0 0 8px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.acal-views { display: flex; gap: 2px; padding: 3px; background: #F1F2F5; border-radius: 10px; }
.acal-view { height: 32px; padding: 0 14px; border: none; border-radius: 8px; background: transparent; color: var(--slate); font-size: 14px; font-weight: 600; cursor: pointer; }
.acal-view.is-on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(17,17,20,.12); }

/* ── layout ──────────────────────────────────────────────────── */
.acal-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.acal-main { flex: 999 1 640px; min-width: 0; background: #fff; border: 1px solid var(--light-gray); border-radius: 14px; overflow: hidden; }
.acal-main.is-loading { opacity: .7; }
.acal-side { flex: 1 1 260px; max-width: 340px; display: flex; flex-direction: column; gap: 14px; }
.acal-card { background: #fff; border: 1px solid var(--light-gray); border-radius: 14px; padding: 14px 16px; }
.acal-card h3 { margin: 0 0 2px; font-size: 15px; font-weight: 800; }
.acal-sub { margin: 0 0 8px; font-size: 14px; color: var(--slate); }
.acal-legend ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.6; color: #434B58; }
.acal-scroll { overflow-x: auto; }
.acal-empty { margin: 0; padding: 16px; font-size: 14px; color: var(--slate); }

/* ── filters ─────────────────────────────────────────────────── */
.acal-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--light-gray); }
.acal-filter { height: 30px; padding: 0 10px; border: 1px solid #D5D9E0; border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.acal-filter.is-off { background: #F1F2F5; border-color: transparent; color: #6B7380; text-decoration: line-through; }
.acal-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--k); flex: 0 0 8px; }
.acal-hide { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; cursor: pointer; }
.acal-hide input { width: 16px; height: 16px; margin: 0; accent-color: var(--coral-500); }
.acal-note { margin: 10px 12px 0; padding: 10px 12px; border-radius: 10px; background: #FFF6F2; border: 1px solid var(--coral-100); font-size: 14px; line-height: 1.45; }
.acal-note.is-err { background: #FDECEC; border-color: #F5C2C2; }
.acal-link { border: none; background: none; padding: 0; color: #A63A1E; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ── shared item bits ────────────────────────────────────────── */
.acal-title { border: none; background: none; padding: 0; margin: 0; color: inherit; font-size: inherit; text-align: left; cursor: pointer; font-weight: inherit; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.acal-title:hover { text-decoration: underline; }
.acal-check { flex: 0 0 18px; width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1.5px solid var(--k); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.acal-check svg { width: 12px; height: 12px; fill: none; stroke: transparent; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.acal-check:hover svg { stroke: var(--k); }
.acal-check.is-done { background: var(--k); border-color: var(--k); }
.acal-check.is-done svg { stroke: #fff; }
.acal-check:disabled { opacity: .5; cursor: progress; }
.acal-status { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--k); opacity: .9; }
.acal-status.is-warn { color: #A63A1E; opacity: 1; }
.acal-act { height: 22px; padding: 0 8px; border: 1px solid color-mix(in srgb, var(--k) 35%, transparent); border-radius: 999px; background: #fff; color: var(--k); font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.acal-act:hover { background: var(--kb); }
.is-done > .acal-title, .is-done .acal-ev-top .acal-title, .acal-need.is-done .acal-title { text-decoration: line-through; }
.is-done { opacity: .58; }

/* ── week ────────────────────────────────────────────────────── */
.acal-week { min-width: 760px; }
.acal-wk-row { display: grid; grid-template-columns: 60px repeat(7, minmax(0, 1fr)); }
.acal-week-5 .acal-wk-row { grid-template-columns: 60px repeat(5, minmax(0, 1fr)); } /* Weekdays view (2026-11-19) */
.acal-wk-head { border-bottom: 1px solid var(--light-gray); }
.acal-wk-day { padding: 8px 6px; text-align: center; border-left: 1px solid #EEF0F3; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.acal-wd { font-size: 13.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); }
.acal-dn { font-size: 17px; font-weight: 700; line-height: 28px; min-width: 28px; }
.acal-wk-day.is-today .acal-dn { background: #C24E27; color: #fff; border-radius: 14px; padding: 0 6px; font-weight: 800; }
.acal-wk-all { background: #FAFAFB; border-bottom: 1px solid var(--light-gray); }
.acal-wk-lbl { font-size: 13px; font-weight: 700; color: var(--slate); padding: 8px 6px; text-align: right; }
.acal-wk-cell { padding: 5px 4px; border-left: 1px solid #EEF0F3; display: flex; flex-direction: column; gap: 3px; min-height: 44px; min-width: 0; }
.acal-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 5px; padding: 3px 5px; border-radius: 6px; background: var(--kb); color: var(--k); font-size: 13.5px; font-weight: 600; line-height: 15px; min-width: 0; }
.acal-chip .acal-title { flex: 1 1 60px; white-space: nowrap; }
.acal-chip.is-late { box-shadow: inset 0 0 0 1.5px #C24E27; }
.acal-wk-hours { position: relative; }
.acal-wk-hour { box-sizing: border-box; font-size: 13px; color: var(--slate); text-align: right; padding-right: 8px; }
.acal-wk-hour span { position: relative; top: -7px; }
.acal-wk-col { position: relative; border-left: 1px solid #EEF0F3; }
.acal-wk-col.is-today { background: #FFFBF9; }
.acal-wk-slot { border-top: 1px solid #F1F2F5; box-sizing: border-box; }
.acal-ev { position: absolute; box-sizing: border-box; padding: 4px 6px; border-radius: 8px; background: var(--kb); color: var(--k); font-size: 13.5px; line-height: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 22%, transparent); z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.acal-ev:hover { z-index: 3; overflow: visible; box-shadow: 0 4px 14px rgba(17,17,20,.14), inset 0 0 0 1px color-mix(in srgb, var(--k) 30%, transparent); }
/* 2026-11-19 (Mark): overlapping items split the column; on hover or keyboard focus a squeezed
   item widens to a readable size (min-width beats the inline width) and shows its full title */
.acal-ev.is-squeezed:hover, .acal-ev.is-squeezed:focus-within { min-width: 200px; z-index: 4; }
.acal-ev.is-squeezed:hover .acal-ev-top .acal-title, .acal-ev.is-squeezed:focus-within .acal-ev-top .acal-title { -webkit-line-clamp: unset; display: block; }
.acal-ev-top { display: flex; align-items: flex-start; gap: 4px; width: 100%; }
.acal-ev-top .acal-title { flex: 1 1 auto; font-weight: 600; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.acal-now { position: absolute; left: 0; right: 0; height: 2px; background: #C24E27; z-index: 2; pointer-events: none; }
.acal-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #C24E27; }

/* ── month ───────────────────────────────────────────────────── */
.acal-month { min-width: 700px; }
.acal-mo-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--light-gray); }
.acal-mo-head div { padding: 9px 10px; font-size: 13.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); }
.acal-mo-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.acal-mo-cell { min-height: 116px; padding: 6px; border-right: 1px solid #EEF0F3; border-bottom: 1px solid #EEF0F3; box-sizing: border-box; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.acal-mo-cell:nth-child(7n) { border-right: 0; }
.acal-mo-cell.is-other { background: #FAFAFB; }
.acal-mo-cell.is-other .acal-mo-num { color: #8A919C; }
.acal-mo-cell.is-today { background: #FFF6F2; }
.acal-mo-num { align-self: flex-start; border: none; background: none; padding: 2px 4px; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; border-radius: 12px; min-width: 24px; }
.acal-mo-cell.is-today .acal-mo-num { background: #C24E27; color: #fff; }
.acal-mo-item { display: flex; align-items: center; gap: 5px; padding: 2px 5px; border-radius: 6px; font-size: 13.5px; line-height: 16px; min-width: 0; }
.acal-mo-item .acal-title { white-space: nowrap; flex: 1 1 auto; }
.acal-mo-item.is-allday { background: var(--kb); color: var(--k); font-weight: 600; }
.acal-mo-item .acal-check { flex-basis: 15px; width: 15px; height: 15px; }
.acal-more { align-self: flex-start; border: none; background: none; padding: 1px 5px; font-size: 13.5px; font-weight: 700; color: var(--slate); cursor: pointer; }

/* ── list ────────────────────────────────────────────────────── */
.acal-lg { border-bottom: 1px solid var(--light-gray); }
.acal-lg-head { display: flex; align-items: baseline; gap: 10px; padding: 10px 16px; background: #FAFAFB; }
.acal-lg.is-late .acal-lg-head { background: #FFF6F2; }
.acal-lg.is-late .acal-lg-head h3 { color: #A63A1E; }
.acal-lg-head h3 { margin: 0; font-size: 14px; font-weight: 800; }
.acal-lg-head span { font-size: 14px; color: var(--slate); }
.acal-li { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-top: 1px solid #F6F7F9; }
.acal-li-time { width: 70px; flex: 0 0 70px; font-size: 14px; color: var(--slate); font-weight: 600; }
.acal-li-dot { width: 18px; flex: 0 0 18px; display: flex; justify-content: center; }
.acal-li-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--k); }
.acal-li-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.acal-li-main .acal-title { font-size: 14px; font-weight: 600; white-space: nowrap; }
.acal-li-where { font-size: 14px; color: var(--slate); }

/* ── needs you ───────────────────────────────────────────────── */
.acal-need { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid #F1F2F5; }
.acal-need .acal-check { margin-top: 1px; }
.acal-need-dot { width: 18px; flex: 0 0 18px; display: flex; justify-content: center; padding-top: 5px; }
.acal-need-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--k); }
.acal-need-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.acal-need-main .acal-title { font-size: 14px; font-weight: 600; white-space: normal; }
.acal-need-when { font-size: 14px; color: var(--slate); }
.acal-need-when.is-late { color: #A63A1E; font-weight: 600; }

/* ── Calendar page + Social embed ────────────────────────────── */
.acal-page { padding: 4px 0 24px; }
.quinn-cal-everything-switch { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; margin-left: auto; }
.quinn-cal-everything-switch input { width: 16px; height: 16px; margin: 0; accent-color: var(--coral-500); }
#quinn-cal-everything { margin-top: 4px; }

@media (max-width: 640px) {
  .acal-hide { margin-left: 0; }
  .acal-range { font-size: 14px; margin-left: 4px; }
}

/* 2026-11-20 (Mark): remove an item from the calendar. The trash button shows
   on hover or keyboard focus; on touch screens it is always shown. */
.acal-del { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; margin-left: 2px; border: 0; border-radius: 5px; background: transparent; color: var(--k); cursor: pointer; opacity: 0; transition: opacity .12s; }
.acal-del svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acal-ev:hover .acal-del, .acal-chip:hover .acal-del, .acal-li:hover .acal-del, .acal-del:focus-visible { opacity: 1; }
.acal-del:hover { background: rgba(0,0,0,.07); }
@media (hover: none) { .acal-del { opacity: 1; } }

/* 2026-11-20 (Mark): Ascent hover card instead of the browser's gray tooltip. */
.acal-tip { position: fixed; z-index: 3000; max-width: 280px; padding: 0; overflow: hidden; background: #fff; color: var(--ink, #1f2328); border: 1px solid var(--border, #e5e7eb); border-radius: 10px; box-shadow: 0 8px 24px rgba(17, 24, 39, .14); font: 400 12px/1.4 'Inter', system-ui, sans-serif; pointer-events: none; }
.acal-tip.is-item { pointer-events: auto; cursor: pointer; }
.acal-tip.is-item:hover { box-shadow: 0 10px 28px rgba(17, 24, 39, .2); }
.acal-tip.is-item:hover .acal-tip-hint { color: var(--coral, #D85A30); }
.acal-tip[hidden] { display: none; }
.acal-tip.is-simple { padding: 6px 10px; font-weight: 400; } /* plain text (Mark, 2026-11-20) */
.acal-tip-head { padding: 9px 12px 8px; background: #F4F4F5; border-bottom: 1px solid var(--border, #e5e7eb); }
.acal-tip-body { padding: 4px 12px 10px; }
.acal-tip-kind { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--k); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.acal-tip-kind i { width: 8px; height: 8px; border-radius: 50%; background: var(--k); }
.acal-tip-title { font-size: 14px; font-weight: 700; color: var(--ink, #1f2328); }
.acal-tip-row { display: flex; align-items: flex-start; gap: 6px; margin-top: 3px; color: var(--slate, #4b5563); }
.acal-tip-row svg { flex: 0 0 13px; width: 13px; height: 13px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acal-tip-status { display: inline-block; margin: 6px 6px 0 0; padding: 2px 7px; border-radius: 999px; background: var(--off-white, #f5f5f4); color: var(--slate, #4b5563); font-size: 13px; font-weight: 600; }
.acal-tip-status.is-warn { background: #FBEAE4; color: #A8431F; }
/* Phase 9 #3 (2026-11-21): ask Taylor for a brief before a call */
.acal-tip-brief { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 4px 10px; border: 1px solid var(--coral, #D85A30); border-radius: 999px; background: #fff; color: var(--coral, #D85A30); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.acal-tip-brief:hover { background: #FBEAE4; }
.acal-tip-brief svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acal-tip-hint { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--border, #eee); color: var(--slate, #6b7280); font-size: 13px; }

/* 2026-11-20 (Mark): more room between the links in a calendar notice. */
.acal-note .acal-link + .acal-link { margin-left: 14px; }

/* Social calendar hover card: channel logos in a row (2026-11-20). */
.btip-logos { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.btip-logo { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; }
.btip-logo img, .btip-logo svg { width: 22px !important; height: 22px !important; margin: 0 !important; border-radius: 5px; }

/* Week boxes that hold up when the page is zoomed (2026-11-25, Mark). The title
   uses as many lines as the box has room for (--lc, set per box); the status
   line and the button never run past the box; in a narrow box the button is
   just its icon. */
.acal-ev { line-height: 16px; container-type: inline-size; }
.acal-ev-top .acal-title { -webkit-line-clamp: var(--lc, 2); }
.acal-ev .acal-status { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acal-act { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; overflow: hidden; }
.acal-act .ti { font-size: 14px; flex: none; }
.acal-act span { overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 130px) {
  .acal-act span { display: none; }
  .acal-act { padding: 0 7px; }
}
/* Two-part title in week boxes (2026-11-25, Mark): no split words; the address
   two sizes smaller under the time and activity. */
.acal-ev-top .acal-title.acal-title2 { display: flex; flex-direction: column; gap: 1px; -webkit-line-clamp: unset; overflow: hidden; overflow-wrap: normal; word-break: normal; }
.acal-tm, .acal-ts { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: normal; word-break: normal; hyphens: none; }
.acal-tm { font-size: 13.5px; line-height: 16px; font-weight: 700; -webkit-line-clamp: 2; }
.acal-ts { font-size: 11.5px; line-height: 14px; font-weight: 500; opacity: .9; -webkit-line-clamp: var(--lc, 2); }
/* Calendar message window (2026-11-25) */
.acal-msg-overlay{z-index:9600}
.acal-msg-modal{width:min(440px,100%)}
.acal-msg-text{margin:0;font-size:14px;line-height:1.55;color:var(--ink)}
.acal-msg-modal .lw-modal-foot{gap:8px}
/* Click to add (2026-11-25) */
.acal-wk-slot[data-act="add"], .acal-wk-cell[data-act="add"], .acal-mo-cell[data-act="add"] { cursor: pointer; }
.acal-wk-slot[data-act="add"]:hover { background: var(--coral-50, #FDF1EE); }
.acal-mo-cell[data-act="add"]:hover, .acal-wk-cell[data-act="add"]:hover { background-color: #FFFAF8; }
.acal-add-modal { width: min(460px, 100%); }
.acal-add-list { display: flex; flex-direction: column; gap: 6px; }
.acal-add-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--border, #E6E1DC); border-radius: 10px; background: #fff; text-align: left; font: inherit; cursor: pointer; }
.acal-add-opt:hover, .acal-add-opt:focus-visible { border-color: var(--coral-300, #F3B7A2); background: var(--coral-50, #FDF1EE); outline: none; }
.acal-add-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--coral-50, #FDF1EE); color: var(--coral-500, #D85A30); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.acal-add-opt b { display: block; font-size: 14px; color: var(--ink); }
.acal-add-opt small { display: block; font-size: 13px; color: var(--slate, #6B645E); margin-top: 1px; }
.acal-add-opt > span:nth-child(2) { flex: 1; min-width: 0; }
.acal-add-go { color: var(--slate, #6B645E); font-size: 16px; }
.acal-add-note { display: flex; align-items: center; gap: 6px; margin: 12px 2px 0; font-size: 13px; color: var(--slate, #6B645E); }
.acal-add-note .ti { color: var(--coral-500, #D85A30); }
.acal-add-opt{padding:8px 12px}.acal-add-ic{width:30px;height:30px;font-size:16px} /* one line per option (2026-11-25) */
/* Details card opens on click; "Open" goes to the item (2026-11-25) */
.acal-tip-open { display: flex; align-items: center; gap: 4px; width: 100%; margin-top: 8px; padding: 8px 0 0; border: 0; border-top: 1px solid var(--border, #eee); background: none; color: var(--coral, #D85A30); font: 600 13.5px/1.2 Inter, sans-serif; text-align: left; cursor: pointer; }
.acal-tip-open:hover { text-decoration: underline; }
.acal-title, .acal-ev { cursor: pointer; }
/* Type filters as checkboxes on one line (2026-11-25) */
.acal-filters { flex-wrap: nowrap; gap: 14px; overflow-x: auto; scrollbar-width: thin; }
.acal-filter-cb { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap; }
.acal-filter-cb input { width: 16px; height: 16px; margin: 0; accent-color: var(--k); cursor: pointer; }
.acal-filter-cb.is-off { color: #6B7380; }
.acal-filters .acal-hide { flex: none; margin-left: auto; padding-left: 12px; white-space: nowrap; }

/* Needs attention tab (2026-11-25, Mark: Option A plus the small month) */
.acal-an.is-loading { opacity: .7; }
.acal-an-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.acal-an-top h2 { margin: 0; font-size: 22px; font-weight: 800; color: var(--ink); }
.acal-an-top p { margin: 4px 0 0; font-size: 14px; color: var(--slate); }
.acal-an-top .acal-hide { margin-left: 0; }
.acal-an-cols { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.acal-an-list { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.acal-an-sec { background: #fff; border: 1px solid var(--light-gray); border-radius: 12px; overflow: hidden; }
.acal-an-sec.is-late { border-color: var(--coral-200); }
.acal-an-head { display: flex; align-items: baseline; gap: 10px; padding: 10px 18px; background: #fafafb; }
.acal-an-sec.is-late .acal-an-head { background: var(--coral-50); }
.acal-an-head h3 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.acal-an-sec.is-late .acal-an-head h3 { color: #B5461F; }
.acal-an-head span { font-size: 13.5px; color: var(--slate); }
.acal-an-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid #ececef; transition: background-color .3s ease; }
.acal-an-row.is-hl { background: var(--coral-50); }
.acal-an-row.is-done .acal-an-main .acal-title { text-decoration: line-through; color: var(--slate); }
.acal-an-row .acal-check { flex-basis: 22px; width: 22px; height: 22px; }
.acal-an-dot { flex: 0 0 22px; display: flex; justify-content: center; }
.acal-an-dot::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--k); }
.acal-an-type { flex: 0 0 auto; padding: 3px 8px; border-radius: 6px; background: var(--kb); color: var(--k); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.acal-an-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acal-an-main .acal-title { font-size: 15px; font-weight: 600; white-space: nowrap; }
.acal-an-where { font-size: 13.5px; color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acal-an-when { flex: 0 0 auto; font-size: 13.5px; font-weight: 500; color: var(--slate); text-align: right; white-space: nowrap; }
.acal-an-when.is-late { color: #B5461F; font-weight: 700; }
.acal-an-act { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.acal-mini { flex: 1 1 260px; max-width: 300px; background: #fff; border: 1px solid var(--light-gray); border-radius: 12px; padding: 14px; }
.acal-mini-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.acal-mini-head b { font-size: 15px; font-weight: 700; }
.acal-mini-head .acal-iconbtn { width: 30px; height: 30px; }
.acal-mini-wd, .acal-mini-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.acal-mini-wd span { text-align: center; font-size: 12px; font-weight: 700; color: var(--slate); padding-bottom: 6px; }
.acal-mini-day { height: 36px; border: 0; border-radius: 8px; background: none; color: #9a9ea6; font-size: 13.5px; font-weight: 500; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; }
.acal-mini-day.has { color: var(--ink); font-weight: 700; }
.acal-mini-day:hover { background: #f3f3f5; }
.acal-mini-day.is-sel { outline: 1.5px solid var(--coral-500); outline-offset: -1.5px; }
.acal-mini-day.is-today { background: var(--coral-500); color: #fff; }
.acal-mini-day.is-today .acal-mini-dot { background: #fff !important; }
.acal-mini-dot { width: 5px; height: 5px; border-radius: 50%; }
.acal-mini-day:focus-visible { outline: 2px solid var(--coral-500); outline-offset: 1px; }
.acal-mini-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--slate); }
.acal-mini-stats { margin-top: 12px; padding-top: 12px; border-top: 1px solid #ececef; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acal-mini-stats div { background: #f6f6f8; border-radius: 9px; padding: 10px; }
.acal-mini-stats div.is-late { background: var(--coral-50); }
.acal-mini-stats b { display: block; font-size: 22px; font-weight: 800; }
.acal-mini-stats .is-late b { color: #B5461F; }
.acal-mini-stats span { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.3; color: var(--slate); }
@media (max-width: 760px) {
  .acal-an-row { flex-wrap: wrap; gap: 8px 12px; }
  .acal-an-main { flex-basis: calc(100% - 140px); }
  .acal-an-when { text-align: left; }
  .acal-mini { max-width: none; }
}
/* the count on the Needs attention tab */
.acal-tab-count { display: inline-block; min-width: 20px; margin-left: 7px; padding: 0 6px; border-radius: 10px; background: var(--coral-500); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; vertical-align: 1px; }
.acal-tab-count[hidden] { display: none; }

/* One-week row (view 'strip', 2026-11-25): Marketing's Today tab. */
.acal-strip .acal-mo-cell { min-height: 104px; }
/* Drag a blog post or newsletter to another day (Marketing). */
.acal-mo-item[draggable="true"], .acal-ev[draggable="true"] { cursor: grab; }
.acal-mo-cell.is-drop { outline: 2px solid var(--coral-500, #D85A30); outline-offset: -2px; background: var(--coral-50, #FBEAE4); }
/* Inside another workflow's card the calendar has no page padding of its own. */
#sp-acal .acal, #qt-acal .acal, #tc-acal .acal { margin: 0; }
/* Property filter (Transactions calendar, 2026-11-25). */
.acal-filters .acal-place { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.acal-filters .acal-place select { font: inherit; font-weight: 500; font-size: 14px; padding: 5px 28px 5px 10px; border: 1px solid #DDE1E6; border-radius: 8px; background-color: #fff; max-width: 260px; }
.acal-filters .acal-place + .acal-hide { margin-left: 0; }
/* Month and week-row items wrap to two lines instead of cutting off
   (2026-11-25, Mark). */
.acal-mo-item { align-items: flex-start; }
.acal-mo-item .acal-dot { margin-top: 4px; }
.acal-mo-item .acal-check { margin-top: 1px; }
.acal-mo-item .acal-title { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; min-width: 0; }
/* Key for the per-property colors (Transactions calendar, 2026-11-25). */
.acal-placekey { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 14px 10px; border-bottom: 1px solid #EEF0F3; font-size: 13.5px; font-weight: 600; color: #3A3F47; }
.acal-placekey span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.acal-placekey i { width: 10px; height: 10px; border-radius: 3px; background: var(--k); }
/* List view grouped by property (Transactions, 2026-11-25). */
.acal-filters .acal-groupby { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.acal-filters .acal-groupby > span { margin-right: 4px; }
.acal-gb { font: inherit; font-size: 14px; font-weight: 600; padding: 4px 10px; border: 1px solid #DDE1E6; background: #fff; color: #5B616B; border-radius: 8px; cursor: pointer; }
.acal-gb.is-on { background: var(--coral-50, #FBEAE4); border-color: var(--coral-500, #D85A30); color: #A63A1E; }
.acal-filters .acal-groupby + .acal-place { margin-left: 16px; }
.acal-filters .acal-groupby { margin-left: auto; }
.acal-lg-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; align-self: center; }
.acal-lg.is-place .acal-li-time { display: flex; flex-direction: column; line-height: 1.25; }
.acal-lg.is-place .acal-li-time small { font-size: 12.5px; color: var(--slate); }
.acal-li-time.is-late { color: #A63A1E; font-weight: 700; }
/* Property dropdown matches the Group by buttons (2026-11-25, Mark). */
.acal .acal-filters .acal-place select {
  font-family: 'Inter', system-ui, sans-serif; font-size: 14px; font-weight: 600; color: #3A3F47; line-height: 20px;
  height: 32px; padding: 0 30px 0 10px; border: 1px solid #DDE1E6; border-radius: 8px; background: #fff;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235B616B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.acal .acal-gb { height: 32px; padding: 0 12px; line-height: 30px; }
