/* Roost · the calendar on the landing (1.6). With cal-demo.js; used by index.html (#calendar) and calendar.html.
   A band of painted sky (like Ask's) holding Roost's window in look A: the glass sidebar, the group tabs on the sky,
   the white sheet with the week. The window is drawn at 1120 × 680 and scaled to fit; under 700 px it becomes the
   phone's (no sidebar, Day / Month / List). Every class starts cx-. Colours are the app's (Theme.swift, look A). */

.cx {
  --k-personal: #e9a23b; --k-work: #15a285; --k-shop: #7357f1; --k-family: #2f9e52; --k-home: #4a8bef; --k-birthdays: #9a8fc0;
  --w-sheet: #fff; --w-ink: #101217; --w-ink2: #3a404c; --w-ink3: #69707d; --w-ink4: #a2a8b3;
  --w-line: #e5e7ec; --w-line2: #eef0f3; --w-chip: #f1f3f6; --w-hover: #f5f6f9;
  --w-glass: rgba(238,242,251,.6); --w-glass-edge: rgba(255,255,255,.6); --w-seg: #f1f3f6; --w-seg-on: #fff;
  --w-btn: #101217; --w-btn-ink: #fff; --w-ev: 14%; --w-dim: rgba(246,247,250,.5);
  --cx-sky: url(assets/demo/sky-ng.jpg);
  position: relative; isolation: isolate; overflow: hidden; color: #fff; padding-block: 92px 76px;
  background: #2a63c9 url(assets/demo/grain.png) 0 0 / 256px 256px;
  background-image: url(assets/demo/grain.png), var(--cx-sky);
  background-size: 256px 256px, cover; background-position: 0 0, center 30%;
}
@media (prefers-color-scheme: dark) {
  .cx {
    --k-personal: #f5b84a; --k-work: #3fd0a8; --k-shop: #a08bff; --k-family: #5fcf7e; --k-home: #6aa8ff; --k-birthdays: #b6abdd;
    --w-sheet: #1e1f23; --w-ink: #ececf0; --w-ink2: #c4c6ce; --w-ink3: #a1a3ab; --w-ink4: #6f717a;
    --w-line: #34353b; --w-line2: #2b2c31; --w-chip: #2b2c31; --w-hover: #26272c;
    --w-glass: rgba(36,38,50,.58); --w-glass-edge: rgba(255,255,255,.12); --w-seg: #2b2c31; --w-seg-on: #4a4b52;
    --w-btn: #ececf0; --w-btn-ink: #1e1f23; --w-ev: 26%; --w-dim: rgba(20,21,25,.45);
    --cx-sky: url(assets/demo/sky-dusk-ng.jpg);
    background-color: #24336e;
  }
}
.cx [hidden] { display: none !important; }
:where(.cx) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- head ---------- */
.cx-head { text-align: center; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.cx-pill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px 0 9px; border-radius: 99px; font: 600 13px var(--sans);
  background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cx-pill svg { width: 17px; height: 17px; --bird: #fff; --belly: rgba(255,255,255,.55); }
.cx h1, .cx h2 { margin-top: 16px; color: #fff; font: 700 clamp(42px, 5.4vw, 74px)/1.02 var(--display); letter-spacing: -.04em; text-shadow: 0 2px 30px rgba(20,40,120,.3); text-wrap: balance; }
.cx h1 em, .cx h2 em { font-style: normal; color: var(--yellow); }
.cx-head > p { margin-top: 18px; max-width: 35em; font-size: 18px; line-height: 1.55; color: rgba(255,255,255,.94); text-shadow: 0 1px 14px rgba(16,30,90,.4); text-wrap: pretty; }

/* the describe line: type an event the way you'd say it */
.cx-bar { display: flex; align-items: center; gap: 12px; width: 600px; max-width: 100%; height: 56px; margin-top: 30px; padding: 0 10px 0 18px; border-radius: 28px;
  border: 1px solid transparent; background: linear-gradient(var(--w-sheet), var(--w-sheet)) padding-box, linear-gradient(90deg, #93bbee, #f1a9bc) border-box;
  box-shadow: 0 20px 44px -18px rgba(14,26,70,.6); color: var(--w-ink); }
.cx-bar svg { width: 22px; height: 22px; flex: none; --bird: var(--w-ink2); --belly: var(--w-sheet); }
.cx-bar input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 17px var(--sans); color: var(--w-ink); }
.cx-bar input::placeholder { color: var(--w-ink4); }
.cx-bar:focus-within { box-shadow: 0 20px 44px -18px rgba(14,26,70,.6), 0 0 0 4px rgba(255,255,255,.35); }
.cx-bar kbd { font: 600 12px var(--sans); color: var(--w-ink3); padding: 3px 8px; border-radius: 6px; box-shadow: 0 0 0 1px var(--w-line), 0 1px 0 var(--w-line); transition: transform .12s, background .12s; cursor: pointer; }
.cx-bar kbd.press { transform: translateY(1px); background: var(--w-chip); }
.cx-tries { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; max-width: 760px; }
.cx-tries button { height: 34px; padding: 0 14px; border-radius: 99px; font: 500 14px var(--sans); color: #fff; background: rgba(20,40,110,.26);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); transition: background .2s, color .2s; }
.cx-tries button:hover { background: rgba(20,40,110,.4); }
.cx-tries button[aria-pressed="true"] { background: #fff; color: #101217; box-shadow: 0 6px 16px -8px rgba(14,20,48,.5); }
.cx-tries button:focus-visible, .cx-win:focus-visible, .cx button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cx-win button:focus-visible { outline-color: #4a8bef; }

/* ---------- the window ---------- */
.cx-stage { position: relative; margin-top: 46px; padding-bottom: 96px; }
.cx-fit { --k: 1; position: relative; width: calc(1120px * var(--k)); height: calc(680px * var(--k)); margin: 0 auto; }
.cx-scale { position: absolute; left: 0; top: 0; width: 1120px; height: 680px; transform: scale(var(--k)); transform-origin: 0 0; }
.cx-win { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; text-align: left; color: var(--w-ink); font: 13px/1.3 var(--sans);
  background: #3d7ad6 var(--cx-sky) center 72% / 160% auto;
  box-shadow: 0 0 0 .5px rgba(10,20,50,.4), 0 50px 100px -36px rgba(8,18,64,.75), 0 14px 34px -14px rgba(8,18,64,.45); }
.cx-win::before { content: ""; position: absolute; inset: 0; background: url(assets/demo/grain.png) 0 0 / 256px 256px; opacity: .5; mix-blend-mode: soft-light; pointer-events: none; }
.cx-win:focus { outline: none; }

/* sidebar: Roost's frosted glass */
.cx-side { position: absolute; left: 8px; top: 8px; bottom: 8px; width: 232px; z-index: 1; display: flex; flex-direction: column; padding: 13px 12px 10px; border-radius: 14px;
  background: var(--w-glass); -webkit-backdrop-filter: blur(26px) saturate(1.5); backdrop-filter: blur(26px) saturate(1.5);
  box-shadow: inset 0 0 0 .5px var(--w-glass-edge), 0 1px 2px rgba(10,20,50,.08); }
.cx-top { display: flex; align-items: center; height: 24px; padding-left: 4px; }
.cx-lights { display: flex; gap: 8px; }
.cx-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.12); }
.cx-lights i:nth-child(2) { background: #febc2e; }
.cx-lights i:nth-child(3) { background: #28c840; }
.cx-places { margin-left: auto; display: flex; gap: 2px; }
.cx-places svg { width: 28px; height: 26px; padding: 5px 6px; border-radius: 7px; fill: none; stroke: var(--w-ink2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cx-places svg.on { background: var(--w-sheet); box-shadow: 0 1px 2px rgba(10,20,50,.16); stroke: var(--w-ink); }
.cx-newrow { display: flex; gap: 8px; margin-top: 16px; }
.cx-newbtn { flex: 1; display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 12px; border-radius: 11px !important; background: var(--w-btn) !important; color: var(--w-btn-ink) !important;
  font-weight: 600 !important; font-size: 13.5px !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 2px 6px -2px rgba(0,0,0,.4); }
.cx-newbtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cx-newbtn kbd { margin-left: auto; font: 500 11.5px var(--sans); opacity: .6; }
.cx-round { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 1px 2px rgba(10,20,50,.12); }
@media (prefers-color-scheme: dark) { .cx-round { background: rgba(255,255,255,.1); } }
.cx-round svg { width: 19px; height: 19px; --bird: var(--w-ink); --belly: transparent; }

.cx-mini { margin-top: 18px; padding: 0 2px; }
.cx-mini-h { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 0 6px; font-size: 13px; }
.cx-mini-h b { font-weight: 650; }
.cx-mini-h span { color: var(--w-ink3); letter-spacing: 6px; }
.cx-mini-g { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 8px; row-gap: 1px; text-align: center; }
.cx-mini-g > i { font: 600 10px/18px var(--sans); color: var(--w-ink3); font-style: normal; }
.cx-mini-r { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, 1fr); border-radius: 7px; }
.cx-mini-r.on { background: rgba(255,255,255,.6); }
@media (prefers-color-scheme: dark) { .cx-mini-r.on { background: rgba(255,255,255,.1); } }
.cx-mini-r b { height: 22px; display: grid; place-items: center; font: 500 11.5px var(--sans); color: var(--w-ink2); }
.cx-mini-r b.o { color: var(--w-ink4); }
.cx-mini-r b.t { position: relative; color: var(--w-btn-ink); font-weight: 650; z-index: 0; }
.cx-mini-r b.t::before { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--w-btn); z-index: -1; }
.cx-mini-r b.s:not(.t) { box-shadow: inset 0 0 0 1.5px var(--w-ink2); border-radius: 50%; width: 22px; justify-self: center; }

.cx-lab { margin: 18px 0 4px 6px; font: 600 11.5px var(--sans); color: var(--w-ink3); }
.cx-acct { display: flex; align-items: center; gap: 6px; margin: 9px 0 3px 6px; font-size: 11.5px; color: var(--w-ink3); }
.cx-acct img { width: 12px; height: 12px; object-fit: contain; }
.cx-cal { display: flex; align-items: center; gap: 9px; height: 24px; padding-left: 6px; font-size: 13px; color: var(--w-ink); }
.cx-cal i { width: 14px; height: 14px; border-radius: 4px; flex: none;
  background: var(--k) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='m3.6 7.2 2.3 2.3 4.5-4.8' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.cx-foot { margin-top: auto; }
.cx-invites { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 8px; border-radius: 8px; font-size: 13px; }
.cx-invites svg, .cx-sync svg { width: 16px; height: 16px; fill: none; stroke: var(--w-ink2); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.cx-invites em { margin-left: auto; font: 500 12.5px var(--sans); color: var(--w-ink3); font-style: normal; transition: opacity .3s; }
.cx-sync { display: flex; align-items: center; justify-content: space-between; height: 28px; margin-top: 6px; padding: 0 8px; font-size: 12px; color: var(--w-ink3); }
.cx-sync span::before { content: "✓ "; color: var(--k-work); }

/* the group tabs on the sky */
.cx-tabs { position: absolute; left: 250px; top: 11px; height: 32px; display: flex; gap: 4px; z-index: 1; font: 600 14px var(--sans); color: #fff; text-shadow: 0 1px 6px rgba(10,25,80,.35); }
.cx-tabs span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; }
.cx-tabs span.on { background: rgba(255,255,255,.2); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.45); }
.cx-tabs em { font-style: normal; opacity: .72; font-weight: 500; }
.cx-tabs i { display: inline-flex; gap: 2px; }
.cx-tabs i::before, .cx-tabs i::after { content: ""; width: 3px; height: 12px; border-radius: 1px; background: var(--k-work); }
.cx-tabs i::after { background: var(--k-shop); }
.cx-tabs i.p::before { background: var(--k-personal); }
.cx-tabs i.p::after { background: var(--k-home); }

/* the sheet */
.cx-sheet { position: absolute; left: 248px; top: 52px; right: 8px; bottom: 8px; z-index: 1; display: flex; flex-direction: column; overflow: hidden; border-radius: 14px;
  background: var(--w-sheet); box-shadow: 0 0 0 .5px rgba(10,20,50,.14), 0 1px 3px rgba(10,20,50,.08); }
.cx-hd { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 14px 0 22px; flex: none; }
.cx-hd h3 { margin-right: auto; font: 700 21px/1 var(--display); letter-spacing: -.02em; color: var(--w-ink); white-space: nowrap; }
.cx-hd h3 span { color: var(--w-ink4); font-weight: 600; margin-left: 3px; }
.cx-seg { display: flex; padding: 3px; border-radius: 9px; background: var(--w-seg); }
.cx-seg button { height: 26px; padding: 0 12px; border-radius: 7px; font-size: 13px; color: var(--w-ink2); transition: background .15s; }
.cx-seg button[aria-pressed="true"] { background: var(--w-seg-on); color: var(--w-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(10,20,50,.14), 0 0 0 .5px rgba(10,20,50,.06); }
.cx-today { height: 30px; padding: 0 13px; border-radius: 15px; background: var(--w-seg) !important; font-size: 13px !important; font-weight: 500 !important; }
.cx-arrows { display: flex; }
.cx-arrows button { width: 30px; height: 30px; border-radius: 8px; font-size: 19px !important; line-height: 1; color: var(--w-ink2) !important; }
.cx-arrows button:hover, .cx-today:hover { background: var(--w-hover) !important; }
.cx-body { position: relative; flex: 1; min-height: 0; }

/* week (and day) */
.cx-week { display: flex; flex-direction: column; height: 100%; }
.cx-dh { display: grid; grid-template-columns: 52px; grid-auto-columns: 1fr; grid-auto-flow: column; height: 32px; flex: none; align-items: center; }
.cx-dn { display: flex; align-items: center; gap: 5px; padding-left: 10px; font-size: 13px; color: var(--w-ink3); }
.cx-dn i { font-style: normal; }
.cx-dn b { min-width: 24px; height: 24px; display: grid; place-items: center; font: 650 15px var(--sans); color: var(--w-ink); }
.cx-dn.past b { color: var(--w-ink3); }
.cx-dn.today b { background: var(--w-btn); color: var(--w-btn-ink); border-radius: 50%; font-size: 13.5px; }
.cx-ad { display: grid; grid-template-columns: 52px 1fr; flex: none; min-height: 32px; padding: 3px 0 5px; border-bottom: 1px solid var(--w-line); }
.cx-g { align-self: center; padding-right: 8px; font: 500 10.5px var(--sans); color: var(--w-ink4); text-align: right; white-space: nowrap; }
.cx-adl { display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-auto-rows: 22px; gap: 3px 0; align-content: center; }
.cx-adc { margin: 0 4px 0 3px; padding: 0 8px; border-radius: 6px; text-align: left; font: 600 12px/22px var(--sans) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--k) var(--w-ev), var(--w-sheet)) !important; color: var(--w-ink); }
.cx-adc.past { opacity: .55; }
.cx-grid { position: relative; flex: none; display: grid; grid-template-columns: 52px 1fr; height: calc(var(--hh) * var(--rows)); }
.cx-hours { position: relative; }
.cx-hours span { position: absolute; right: 8px; transform: translateY(-50%); font: 500 10.5px var(--sans); color: var(--w-ink4); }
.cx-cols { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr);
  background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--hh) - 1px), var(--w-line2) calc(var(--hh) - 1px) var(--hh)); }
.cx-col { position: relative; border-left: 1px solid var(--w-line2); }
.cx-ev { position: absolute; margin-left: 3px; display: flex; flex-direction: column; justify-content: flex-start; overflow: hidden; padding: 3px 6px 2px 10px; border-radius: 6px; text-align: left;
  font-size: 12px !important; line-height: 1.22 !important; color: var(--w-ink) !important; background: color-mix(in srgb, var(--k) var(--w-ev), var(--w-sheet)) !important;
  transition: opacity .3s, box-shadow .3s, background .3s; }
.cx-ev::before { content: ""; position: absolute; left: 3px; top: 3px; bottom: 3px; width: 3px; border-radius: 2px; background: var(--k); }
.cx-ev > * { flex: none; }
.cx-ev b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-ev span { color: var(--w-ink2); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cx-ev small { color: var(--w-ink3); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-ev.short { flex-direction: row; align-items: center; gap: 6px; padding-block: 0; }
.cx-ev.short b { flex: 0 1 auto; min-width: 0; }
.cx-ev.split b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
.cx-ev.short span { color: var(--w-ink3); }
.cx-ev.past { opacity: .5; }
.cx-ev.inv { background: var(--w-sheet) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 70%, transparent); }
.cx-ev.inv::before, .cx-ev.maybe::before { background: repeating-linear-gradient(to bottom, var(--k) 0 3px, transparent 3px 6px); }
.cx-ev.new { box-shadow: inset 0 0 0 1.5px var(--k); }
.cx-ev:hover { filter: brightness(.98); }
@media (prefers-color-scheme: dark) { .cx-ev:hover { filter: brightness(1.08); } }
.cx-ev.land, .cx-adc.land, .cx-li.land, .cx-mi.land { animation: cx-land .75s cubic-bezier(.2,.9,.25,1) both, cx-ring 1.5s ease-out .2s both; }
@keyframes cx-land { from { transform: translateY(-16px) scale(.9); opacity: 0; } }
@keyframes cx-ring { from { box-shadow: inset 0 0 0 1.5px var(--k), 0 0 0 0 color-mix(in srgb, var(--k) 55%, transparent); } 60% { box-shadow: inset 0 0 0 1.5px var(--k), 0 0 0 9px transparent; } to { box-shadow: inset 0 0 0 1.5px var(--k), 0 0 0 9px transparent; } }
.cx-now { position: absolute; left: 0; right: 0; height: 0; pointer-events: none; z-index: 2; }
.cx-now::before { content: ""; position: absolute; left: 52px; right: 0; top: 0; border-top: 1px solid color-mix(in srgb, var(--w-ink) 22%, transparent); }
.cx-now em { position: absolute; left: 3px; top: -10px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center;
  font: 650 11px var(--sans); font-style: normal; font-variant-numeric: tabular-nums; background: var(--w-btn); color: var(--w-btn-ink); }
.cx-now i { position: absolute; top: -1px; height: 2px; background: var(--w-btn);
  left: calc(52px + (100% - 52px) / var(--n) * var(--ti)); width: calc((100% - 52px) / var(--n)); }
.cx-now i::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--w-btn); }

/* day: one column and the event beside it */
.cx-day { display: grid; grid-template-columns: 1fr 300px; height: 100%; }
.cx-day .cx-week { border-right: 1px solid var(--w-line); }
.cx-dside { padding: 22px 22px; }
.cx-empty { color: var(--w-ink3); font-size: 13.5px; }

/* month */
.cx-month { display: flex; flex-direction: column; height: 100%; }
.cx-mh { display: grid; grid-template-columns: repeat(7, 1fr); height: 26px; flex: none; align-items: center; border-bottom: 1px solid var(--w-line); font: 600 11.5px var(--sans); color: var(--w-ink3); }
.cx-mh span { padding-left: 10px; }
.cx-mg { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(var(--rows), minmax(0, 1fr)); }
.cx-mc { position: relative; display: flex; flex-direction: column; gap: 1px; min-width: 0; overflow: hidden; padding: 4px 5px; border-right: 1px solid var(--w-line2); border-bottom: 1px solid var(--w-line2); }
.cx-mc:nth-child(7n) { border-right: 0; }
.cx-md { display: flex; align-items: center; gap: 4px; height: 22px; padding-left: 3px; font-size: 11.5px; color: var(--w-ink3); }
.cx-md b { min-width: 22px; height: 22px; display: grid; place-items: center; font: 600 12.5px var(--sans); color: var(--w-ink); }
.cx-mc.out .cx-md b, .cx-mc.out .cx-md { color: var(--w-ink4); }
.cx-mc.today .cx-md b { background: var(--w-btn); color: var(--w-btn-ink); border-radius: 50%; }
.cx-mi { display: flex; align-items: center; gap: 5px; min-width: 0; height: 19px; padding: 0 4px; border-radius: 5px; text-align: left; font-size: 11.5px !important; color: var(--w-ink) !important; white-space: nowrap; overflow: hidden; }
.cx-mi i { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--k); }
.cx-mi span { color: var(--w-ink3); font-variant-numeric: tabular-nums; }
.cx-mi.ad { background: color-mix(in srgb, var(--k) var(--w-ev), var(--w-sheet)) !important; font-weight: 600; padding-left: 6px; }
.cx-mi.inv i { background: none; box-shadow: inset 0 0 0 1.5px var(--k); }
.cx-mi:hover { background: var(--w-hover); }
.cx-mc.out .cx-mi, .cx-mc.past .cx-mi { opacity: .55; }
.cx-more { padding-left: 4px; font-size: 11px; color: var(--w-ink3); }

/* list */
.cx-list { height: 100%; overflow: auto; padding: 0 22px 20px; scrollbar-width: none; }
.cx-list::-webkit-scrollbar { display: none; }
.cx-list h5 { position: sticky; top: 0; z-index: 1; margin: 0; padding: 14px 0 6px; font: 500 12.5px var(--sans); color: var(--w-ink3); background: var(--w-sheet); }
.cx-list h5 b { color: var(--w-ink); font-weight: 650; margin-right: 3px; }
.cx-li { display: grid; grid-template-columns: 52px 4px 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 6px 10px; border-radius: 10px; text-align: left; }
.cx-li:hover { background: var(--w-hover) !important; }
.cx-lt { font: 600 13px/1.25 var(--sans); font-variant-numeric: tabular-nums; color: var(--w-ink); }
.cx-lt small { display: block; font-weight: 500; font-size: 12px; color: var(--w-ink3); }
.cx-li > i { width: 4px; height: 32px; border-radius: 2px; background: var(--k); }
.cx-li.inv > i { background: repeating-linear-gradient(to bottom, var(--k) 0 3px, transparent 3px 6px); }
.cx-ln { min-width: 0; display: grid; }
.cx-ln b { font: 600 14px var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-ln small { font-size: 12px; color: var(--w-ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-li.past { opacity: .5; }
.cx-join { display: inline-grid; place-items: center; height: 24px; padding: 0 11px; border-radius: 12px; background: var(--w-btn); color: var(--w-btn-ink); font: 600 12px var(--sans); cursor: pointer; }

/* an event, in the popover and beside Day */
.cx-dt { position: relative; padding-left: 14px; }
.cx-dt-bar { position: absolute; left: 0; top: 2px; bottom: 2px; width: 4px; border-radius: 2px; background: var(--k); }
.cx-dt h4 { font: 650 17px/1.25 var(--display); letter-spacing: -.01em; color: var(--w-ink); }
.cx-dt p { margin-top: 4px; font-size: 13px; color: var(--w-ink2); }
.cx-dt p.cx-dt-t { margin-top: 1px; font-variant-numeric: tabular-nums; }
.cx-dt dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin-top: 14px; font-size: 13px; align-items: center; }
.cx-dt dt { color: var(--w-ink3); }
.cx-dt dd { display: flex; align-items: center; gap: 8px; color: var(--w-ink); min-width: 0; }
.cx-sw { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--k); }
.cx-pop { position: absolute; z-index: 6; width: 290px; padding: 16px 16px 16px; border-radius: 13px; background: var(--w-sheet); color: var(--w-ink);
  box-shadow: 0 0 0 .5px rgba(10,20,50,.2), 0 22px 44px -14px rgba(10,20,50,.4); animation: cx-pop .18s ease-out; }
@keyframes cx-pop { from { opacity: 0; transform: scale(.97); } }

/* New event: the sheet that "describe it" fills */
.cx-new { position: absolute; left: 248px; top: 52px; right: 8px; bottom: 8px; z-index: 5; display: grid; justify-items: center; align-content: start; padding-top: 26px; border-radius: 14px; background: var(--w-dim); }
.cx-nf { width: 470px; overflow: hidden; border-radius: 16px; background: var(--w-sheet); box-shadow: 0 0 0 .5px rgba(10,20,50,.2), 0 34px 70px -20px rgba(10,20,60,.5); }
.cx-new.in .cx-nf { animation: cx-sheet .34s cubic-bezier(.2,.9,.3,1); }
@keyframes cx-sheet { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.cx-nf header { display: flex; align-items: center; gap: 11px; height: 50px; padding: 0 18px; font-size: 15px; font-weight: 500; color: var(--w-ink);
  border-bottom: 1px solid var(--w-line2); background: linear-gradient(90deg, color-mix(in srgb, #93bbee 9%, var(--w-sheet)), var(--w-sheet) 45%, color-mix(in srgb, #f1a9bc 12%, var(--w-sheet))); }
.cx-nf header svg { width: 20px; height: 20px; flex: none; --bird: var(--w-ink); --belly: transparent; }
.cx-nf header span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-rows { display: grid; grid-template-columns: 76px 1fr; gap: 7px 12px; align-items: center; padding: 16px 20px 4px; }
.cx-rows label { text-align: right; font-size: 13px; color: var(--w-ink3); }
.cx-v { display: flex; align-items: center; gap: 8px; min-width: 0; height: 30px; padding: 0 10px; border-radius: 8px; background: var(--w-chip); font-size: 13px; color: var(--w-ink); white-space: nowrap; overflow: hidden; }
.cx-v.big { font-weight: 650; font-size: 14px; }
.cx-v.ph { color: var(--w-ink4); }
.cx-v.dd::after { content: ""; margin-left: auto; width: 6px; height: 6px; border: solid var(--w-ink3); border-width: 0 1.4px 1.4px 0; transform: translateY(-2px) rotate(45deg); }
.cx-v img { width: 13px; height: 13px; }
.cx-v2 { display: grid; grid-template-columns: 1fr 86px; gap: 8px; }
.cx-v2 .cx-v[hidden] + * { display: none; }
.cx-tg { display: block; width: 30px; height: 18px; border-radius: 9px; background: var(--w-line); position: relative; transition: background .2s; }
.cx-tg::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.cx-tg.on { background: #34c759; }
.cx-tg.on::after { transform: translateX(12px); }
.cx-nf footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }
.cx-b1, .cx-b2 { height: 32px; padding: 0 16px; border-radius: 16px; font-size: 13.5px !important; font-weight: 600 !important; transition: transform .12s; }
.cx-b1 { background: var(--w-btn) !important; color: var(--w-btn-ink) !important; }
.cx-b2 { background: var(--w-chip) !important; }
.cx .press { transform: scale(.95); }
.cx-new.play .cx-rows > :nth-child(even) { animation: cx-fill .4s ease-out both; animation-delay: calc(var(--i, 0) * 60ms + 120ms); }
@keyframes cx-fill { from { opacity: 0; transform: translateX(-4px); } }

.cx-toast { position: absolute; left: 50%; bottom: 22px; z-index: 7; transform: translate(-50%, 8px); padding: 9px 14px; border-radius: 10px; background: rgba(14,20,48,.94); color: #fff;
  font: 500 13px var(--sans); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.cx-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* the next meeting on the notch */
.cx-notch { position: absolute; left: 63.5%; top: 0; z-index: 4; width: 300px; display: flex; align-items: center; gap: 11px; padding: 12px 10px 12px 12px; border-radius: 0 0 22px 22px;
  background: #000; color: #fff; text-align: left; box-shadow: 0 18px 34px -14px rgba(0,0,0,.55); transform: translate(-50%, -110%); transition: transform .7s cubic-bezier(.2,.9,.25,1); }
.cx-notch.in { transform: translate(-50%, 0); }
.cx-nv { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #2a2a2e; }
.cx-nv svg, .cx-vid { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.cx-nt { flex: 1; min-width: 0; display: grid; font-size: 12px; color: rgba(255,255,255,.55); }
.cx-nt em { font-style: normal; color: #3fd0a8; font-weight: 600; }
.cx-nt b { font: 650 14px var(--sans); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-notch button { height: 28px; padding: 0 14px; border-radius: 14px; background: #fff !important; color: #000 !important; font: 650 13px var(--sans) !important; }

/* the invitation, in its letter */
.cx-inv { position: absolute; right: -84px; bottom: -70px; z-index: 4; width: 300px; padding: 14px 16px 15px; border-radius: 16px; text-align: left; color: var(--w-ink); font: 13px/1.35 var(--sans);
  background: var(--w-sheet); box-shadow: 0 0 0 .5px rgba(10,20,50,.22), 0 34px 70px -22px rgba(8,18,64,.65), 0 10px 24px -12px rgba(8,18,64,.35); }
.cx-inv-from { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cx-pic { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; font: 650 9.5px var(--sans); color: var(--k-work); background: color-mix(in srgb, var(--k-work) 14%, transparent); }
.cx-inv-from b { font-weight: 650; }
.cx-inv-to { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--k-work); }
.cx-inv-to img { width: 12px; height: 12px; }
.cx-ic { margin-top: 10px; padding: 12px 14px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--w-line); }
.cx-ic h4 { font: 650 15px var(--display); color: var(--w-ink); }
.cx-ic .cx-when { margin-top: 3px; font-size: 13px; color: var(--w-ink2); }
.cx-meet { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 13px; color: var(--w-ink); }
.cx-ic .cx-join { height: 22px; padding: 0 10px; font-size: 11.5px; }
.cx-ans { display: flex; gap: 6px; margin-top: 14px; }
.cx-ans button { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 13px; border-radius: 15px; font-size: 13px !important; font-weight: 600 !important; background: var(--w-chip) !important; transition: transform .12s, background .2s; }
.cx-ans button[data-a="yes"], .cx-ans button[aria-pressed="true"] { background: var(--w-btn) !important; color: var(--w-btn-ink) !important; }
.cx-inv.answered .cx-ans button[aria-pressed="false"] { background: var(--w-chip) !important; color: var(--w-ink) !important; }
.cx-ans button[aria-pressed="true"]::before { content: "✓"; font-size: 12px; }

/* ---------- under the window ---------- */
.cx-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; width: fit-content; max-width: calc(100% - 32px); margin: 8px auto 0; padding: 12px 26px; list-style: none; border-radius: 99px;
  background: rgba(18,38,110,.34); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
@media (prefers-color-scheme: dark) { .cx-points { background: rgba(14,16,40,.42); } }
.cx-points li { display: flex; align-items: center; gap: 10px; font: 600 16px var(--display); color: #fff; text-shadow: 0 1px 10px rgba(16,30,90,.45); }
.cx-points svg { width: 20px; height: 20px; flex: none; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cx-morep { margin-top: 30px; text-align: center; }
.cx-morep a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 18px; border-radius: 99px; font: 600 14px var(--sans); color: #101217; background: #fff;
  box-shadow: 0 8px 20px -10px rgba(6,10,40,.6); transition: transform .15s; }
.cx-morep a::after { content: "→"; }
.cx-morep a:hover { transform: translateY(-1px); }
.fp-page .cx-morep { display: none; }
.cx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the phone's window: cal-demo.js sets .compact on the band under 700 px ---------- */
@media (max-width: 1340px) { .cx-inv { right: -14px; bottom: -110px; } }
.cx.compact .cx-fit { width: 100%; height: auto; }
.cx.compact .cx-scale { position: relative; width: auto; height: auto; transform: none; display: flex; flex-direction: column; }
.cx.compact .cx-win { position: relative; inset: auto; height: 540px; border-radius: 16px; }
.cx.compact .cx-side, .cx.compact .cx-tabs, .cx.compact .cx-seg [data-v="week"], .cx.compact .cx-notch { display: none; }
.cx.compact .cx-sheet, .cx.compact .cx-new { left: 6px; top: 6px; right: 6px; bottom: 6px; }
.cx.compact .cx-hd { height: auto; flex-wrap: wrap; gap: 10px 8px; padding: 14px 12px 8px 16px; }
.cx.compact .cx-hd h3 { flex: 1 0 100%; font-size: 19px; }
.cx.compact .cx-seg { margin-right: auto; }
.cx.compact .cx-day { grid-template-columns: 1fr; }
.cx.compact .cx-day .cx-week { border-right: 0; }
.cx.compact .cx-dside { display: none; }
.cx.compact .cx-list { padding: 0 10px 16px; }
.cx.compact .cx-mi span, .cx.compact .cx-more { display: none; }
.cx.compact .cx-mi { padding: 0 3px; font-size: 10.5px !important; }
.cx.compact .cx-mi i { width: 5px; height: 5px; }
.cx.compact .cx-mh span { padding-left: 5px; }
.cx.compact .cx-nf { width: calc(100% - 20px); }
.cx.compact .cx-rows { grid-template-columns: 62px 1fr; padding-inline: 14px; }
.cx.compact .cx-v2 { grid-template-columns: 1fr 64px; }
.cx.compact .cx-inv { position: relative; right: auto; bottom: auto; width: 100%; max-width: 420px; margin: 14px auto 0; }
.cx.compact .cx-stage { padding-bottom: 0; }
.cx.compact .cx-pop { width: min(290px, calc(100% - 20px)); }
@media (max-width: 640px) { .cx-points { flex-direction: column; align-items: flex-start; gap: 12px; border-radius: 18px; padding: 16px 22px; } }
@media (max-width: 640px) {
  .cx { padding-block: 64px 56px; }
  .cx-head > p { font-size: 16.5px; }
  .cx-bar { height: 50px; margin-top: 24px; }
  .cx-bar input { font-size: 16px; }
  .cx-tries { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .cx-tries::-webkit-scrollbar { display: none; }
  .cx-tries button { flex: none; }
  .cx-stage { margin-top: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .cx-notch, .cx-toast, .cx-ev { transition: none; }
  .cx *, .cx *::before { animation: none !important; }
}
