/* Orava Connect slice 1 (2026-11-11) — one stylesheet for every Connect page and component.
   Global on purpose (prefix cx-): the cards are drawn by several pages AND by components inside
   Radzen containers, where scoped CSS does not reach (CLAUDE.md, CSS isolation rule).
   Theme-agnostic: only semantic Radzen tokens, --akili-accent-fg for accent TEXT, color-mix tints. */

.cx-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    max-width: 960px;
}

.cx-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--rz-border-color);
    border-radius: 16px;
    background: var(--rz-base-background-color);
    color: var(--rz-text-color);
}

.cx-card--muted { background: var(--rz-fill-subtle); }

.cx-card__head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.cx-icon-chip {
    flex: 0 0 auto;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--akili-accent-fg);
    background: color-mix(in srgb, var(--akili-accent-fg) 14%, transparent);
}

.cx-card__titles { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }

.cx-kind {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rz-text-secondary-color);
}

.cx-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.cx-sub, .cx-muted {
    color: var(--rz-text-secondary-color);
    font-size: 0.875rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.cx-time { flex: 0 0 auto; color: var(--rz-text-secondary-color); font-size: 0.78rem; }

.cx-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }

.cx-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; min-width: 0; }
.cx-row--between { justify-content: space-between; }
.cx-grow { flex: 1 1 auto; min-width: 0; }

.cx-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.cx-quiet {
    border: none;
    background: transparent;
    color: var(--rz-text-secondary-color);
    font: inherit;
    font-size: 0.875rem;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    min-height: 36px;
}
.cx-quiet:hover, .cx-quiet:focus-visible { color: var(--rz-text-color); background: var(--rz-fill-subtle); }

.cx-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--rz-border-color);
    font-size: 0.8rem;
    color: var(--rz-text-color);
    background: transparent;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cx-chip .rzi, .cx-chip .material-symbols-outlined { font-size: 1rem; }
.cx-chip--ok { color: var(--rz-success); border-color: color-mix(in srgb, var(--rz-success) 45%, transparent); }
.cx-chip--warn { color: var(--rz-warning-darker, var(--rz-warning)); border-color: color-mix(in srgb, var(--rz-warning) 55%, transparent); }
.cx-chip--danger { color: var(--rz-danger); border-color: color-mix(in srgb, var(--rz-danger) 45%, transparent); }
.cx-chip--accent { color: var(--akili-accent-fg); border-color: color-mix(in srgb, var(--akili-accent-fg) 45%, transparent); }
a.cx-chip--link { text-decoration: none; cursor: pointer; }
a.cx-chip--link:hover, a.cx-chip--link:focus-visible { background: color-mix(in srgb, var(--akili-accent-fg) 12%, transparent); }
button.cx-chip--file { text-align: left; }
button.cx-chip--file:hover, button.cx-chip--file:focus-visible { border-color: var(--akili-accent-fg); color: var(--akili-accent-fg); }
button.cx-chip { cursor: pointer; font: inherit; font-size: 0.8rem; }
button.cx-chip.is-active { background: color-mix(in srgb, var(--akili-accent-fg) 14%, transparent); border-color: var(--akili-accent-fg); color: var(--akili-accent-fg); }

.cx-field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.cx-field > label, .cx-label { font-size: 0.85rem; font-weight: 600; color: var(--rz-text-color); }
.cx-hint { font-size: 0.8rem; color: var(--rz-text-secondary-color); line-height: 1.4; }

.cx-input, .cx-textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--rz-border-color);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    background: var(--rz-base-background-color);
    color: var(--rz-text-color);
    font: inherit;
    font-size: 1rem; /* 16px: iOS never zooms on focus */
}
.cx-textarea { min-height: 6rem; resize: vertical; line-height: 1.45; }
.cx-input:focus, .cx-textarea:focus { outline: 2px solid var(--akili-accent-fg); outline-offset: 1px; }

.cx-choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cx-choices--column { flex-direction: column; flex-wrap: nowrap; }
.cx-choices--column .cx-choice { flex: 0 0 auto; }
.cx-choice .cx-chip, .cx-choices--column .cx-choice__sub { margin-left: auto; flex-shrink: 0; white-space: nowrap; }
.cx-choice {
    flex: 1 1 10rem;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--rz-border-color);
    border-radius: 14px;
    background: var(--rz-base-background-color);
    color: var(--rz-text-color);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.cx-choice.is-active { border-color: var(--akili-accent-fg); box-shadow: 0 0 0 1px var(--akili-accent-fg) inset; }
.cx-choice .rzi { color: var(--akili-accent-fg); }
.cx-choice__text { display: flex; flex-direction: column; min-width: 0; }
.cx-choice__sub { font-size: 0.8rem; color: var(--rz-text-secondary-color); }

.cx-list { display: flex; flex-direction: column; gap: 0.6rem; }

.cx-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--rz-text-secondary-color);
    margin: 0.4rem 0 0;
}

/* ── Thread ── */
.cx-thread { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
/* Batch 2 item 5: the composer carries data-fab-clearance, so the orb is lifted to sit just ABOVE it — which put it over
   the last card. The timeline ends with an empty lane the orb's height (56px button + fabClearance's 12px gap + 4px) so,
   scrolled to the end, the orb rests in the lane and never covers a card. */
:root:has(.assistant-fab) .cx-thread { padding-bottom: 72px; }

.cx-bubble {
    max-width: min(46rem, 92%);
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.75rem 0.85rem;
    border-radius: 16px 16px 16px 6px;
    background: var(--rz-fill-subtle);
    color: var(--rz-text-color);
    border: 1px solid var(--rz-border-color);
    min-width: 0;
}
.cx-bubble--out {
    align-self: flex-end;
    border-radius: 16px 16px 6px 16px;
    background: color-mix(in srgb, var(--akili-accent-fg) 10%, var(--rz-base-background-color));
}
.cx-bubble--note { align-self: stretch; max-width: none; border-style: dashed; }
.cx-bubble--draft { align-self: stretch; max-width: none; border-color: var(--akili-accent-fg); }
.cx-bubble__meta { display: flex; align-items: center; gap: 0.4rem; color: var(--rz-text-secondary-color); font-size: 0.75rem; flex-wrap: wrap; }
.cx-bubble__subject { font-weight: 600; overflow-wrap: anywhere; }

.cx-ask {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--rz-warning) 12%, var(--rz-base-background-color));
    border: 1px solid color-mix(in srgb, var(--rz-warning) 40%, transparent);
}

.cx-day {
    align-self: center;
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--rz-fill-subtle);
}

.cx-composer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem calc(0.6rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
    margin: 0 -0.25rem;
    border-top: 1px solid var(--rz-border-color);
    background: var(--rz-base-background-color);
}
/* Skill rule 3: nothing may sit under the MAUI tab bar. max(), never a sum (the keyboard covers the dock). */
body.has-bottom-tab-bar .cx-composer {
    bottom: max(var(--kb-inset, 0px), calc(var(--maui-tabbar-height, 56px) + var(--safe-bottom, 0px)));
}
body.has-bottom-tab-bar:has(.bottom-tab-bar.dock--hidden) .cx-composer { bottom: var(--kb-inset, 0px); }
/* Batch 2 item 3: the sticky composer (its pill/handle included) never shows through or under an open sheet or dialog —
   the File under… picker opened on the phone with the composer's grabber visible below its Close row. Same :root:has()
   style the orb uses to stand aside. */
:root:has(.action-sheet-overlay--open) .cx-composer,
:root:has(.rz-dialog) .cx-composer { visibility: hidden; }

/* ── Today ── */
.cx-today-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }

.cx-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    padding: 2.5rem 1rem;
    color: var(--rz-text-secondary-color);
}
.cx-empty .rzi { font-size: 2.5rem; color: var(--akili-accent-fg); }
.cx-empty__title { font-weight: 600; color: var(--rz-text-color); font-size: 1.05rem; }

/* ── Notes ── */
.cx-recorder { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 1.25rem 0.5rem; }
.cx-record-btn {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rz-danger);
    color: var(--rz-on-danger, #fff);
    cursor: pointer;
    box-shadow: 0 6px 22px color-mix(in srgb, var(--rz-danger) 35%, transparent);
}
.cx-record-btn .rzi { font-size: 2.4rem; }
.cx-record-btn.is-recording { animation: cx-pulse 1.4s ease-in-out infinite; }
@keyframes cx-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rz-danger) 45%, transparent); } 50% { box-shadow: 0 0 0 14px transparent; } }
@media (prefers-reduced-motion: reduce) { .cx-record-btn.is-recording { animation: none; } }
.cx-clock { font-variant-numeric: tabular-nums; font-size: 1.6rem; font-weight: 600; }
.cx-recording-banner {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border-radius: 10px;
    color: var(--rz-danger); background: color-mix(in srgb, var(--rz-danger) 10%, transparent); font-weight: 600;
}
.cx-progress { width: 100%; height: 6px; border-radius: 3px; background: var(--rz-fill-muted); overflow: hidden; }
.cx-progress__bar { height: 100%; background: var(--akili-accent-fg); transition: width 0.2s ease; }

.cx-consent {
    display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.6rem 0.75rem; border-radius: 10px;
    background: var(--rz-fill-subtle); color: var(--rz-text-color); font-size: 0.9rem;
}
.cx-consent .rzi { color: var(--akili-accent-fg); }

/* ── Pickers (no dropdowns in phone dialogs) ── */
.cx-picker { display: flex; flex-direction: column; gap: 0.4rem; }
.cx-picker__results { display: flex; flex-direction: column; border: 1px solid var(--rz-border-color); border-radius: 12px; overflow: hidden; }
.cx-picker__row {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.75rem; border: none; border-bottom: 1px solid var(--rz-border-color);
    background: var(--rz-base-background-color); color: var(--rz-text-color); font: inherit; text-align: left; cursor: pointer; min-height: 44px;
}
.cx-picker__row:last-child { border-bottom: none; }
.cx-picker__row:hover, .cx-picker__row:focus-visible { background: var(--rz-fill-subtle); }

/* ── Time ── */
.cx-entry { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.6rem 0; border-top: 1px solid var(--rz-border-color); }
.cx-entry:first-of-type { border-top: none; }
.cx-entry input[type=checkbox] { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; accent-color: var(--akili-accent-fg); }
.cx-amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

.cx-bottom-bar {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    border: 1px solid var(--rz-border-color);
    border-radius: 14px;
    background: var(--rz-base-background-color);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
}
body.has-bottom-tab-bar .cx-bottom-bar {
    bottom: max(var(--kb-inset, 0px), calc(var(--maui-tabbar-height, 56px) + var(--safe-bottom, 0px) + 26px));
}

/* ── Public "mailbox connected" page ── */
.cx-done {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: var(--rz-body-background-color);
    color: var(--rz-text-color);
}
.cx-done__card { max-width: 26rem; width: 100%; text-align: center; }
.cx-done__card .rzi { font-size: 3rem; }
.cx-done__ok { color: var(--rz-success); }
.cx-done__fail { color: var(--rz-danger); }

@media (max-width: 767.98px) {
    .cx-card { padding: 0.85rem; border-radius: 14px; }
    .cx-bubble { max-width: 94%; }
}

/* Batch 1 (2026-11-11): an unknown-sender card opens the mail behind it; the sheet's body scrolls on its own. */
.cx-card--tappable { cursor: pointer; }
.cx-card--tappable:hover { border-color: var(--akili-accent-fg); }
.cx-mail-body { max-height: 45vh; overflow: auto; padding: 0.6rem 0.75rem; border: 1px solid var(--rz-border-color); border-radius: 12px; background: var(--rz-base-background-color); }
.cx-mail-row { color: inherit; text-decoration: none; padding: 0.35rem 0; border-bottom: 1px solid var(--rz-border-color); gap: 0.6rem; }
.cx-mail-row:last-child { border-bottom: 0; }
.cx-mail-row:hover .cx-grow { text-decoration: underline; }

/* Batch 2 item 6: an ignored domain may be long (mail.recruiting.example.co.uk) — it wraps, the Remove button stays. */
.cx-ignored-domain { min-width: 0; overflow-wrap: anywhere; font-weight: 600; color: var(--rz-text-color); }

/* Batch 2 item 9: the card page's two sides — side by side from 560px, stacked on a phone. */
.cx-card-sides { display: grid; grid-template-columns: 1fr; gap: 0.6rem; min-width: 0; }
@media (min-width: 560px) { .cx-card-sides { grid-template-columns: 1fr 1fr; } }
.cx-card-side {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    padding: 0.7rem 0.8rem;
    border: 1px dashed var(--rz-border-color);
    border-radius: 12px;
}
.cx-card-side.is-set { border-style: solid; border-color: color-mix(in srgb, var(--rz-success) 45%, var(--rz-border-color)); }
.cx-file-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--rz-border-color);
    color: var(--rz-text-color);
    font-size: 0.85rem;
    cursor: pointer;
}
.cx-file-button--primary { background: var(--rz-primary); border-color: var(--rz-primary); color: var(--rz-on-primary); }
.cx-file-button.is-disabled { opacity: 0.5; pointer-events: none; }
.cx-file-button .rzi { font-size: 1rem; }

/* Batch 2 item 13: Today's search box — in the page flow, full width, themed through the Radzen tokens. */
.cx-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.35rem 0.5rem 0.35rem 0.75rem;
    border: 1px solid var(--rz-border-color);
    border-radius: 999px;
    background: var(--rz-base-background-color);
    color: var(--rz-text-secondary-color);
}
.cx-search:focus-within { border-color: var(--akili-accent-fg); box-shadow: 0 0 0 2px color-mix(in srgb, var(--akili-accent-fg) 25%, transparent); }
.cx-search .rzi { font-size: 1.15rem; flex-shrink: 0; }
.cx-search__input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--rz-text-color);
    font: inherit;
    font-size: 1rem; /* 16px: iOS never zooms the page on focus */
    padding: 0.25rem 0;
}
.cx-search__input::placeholder { color: var(--rz-text-secondary-color); }
.cx-search__input::-webkit-search-cancel-button { display: none; }
.cx-search__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--rz-text-secondary-color);
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    cursor: pointer;
    flex-shrink: 0;
}
.cx-search__clear:hover, .cx-search__clear:focus-visible { background: color-mix(in srgb, var(--rz-text-color) 10%, transparent); color: var(--rz-text-color); }

/* 2026-11-14: Today's inline undo bar ("Ignore" on a stranger, ✗ on a matter card) — in flow at the top of the list, theme vars only. */
.cx-undo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid var(--rz-border-color);
    background: color-mix(in srgb, var(--akili-accent-fg) 8%, var(--rz-base-background-color));
    color: var(--rz-text-color);
}
.cx-undo > .rzi { color: var(--rz-text-secondary-color); font-size: 1.1rem; }
.cx-undo__text { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; font-size: 0.9rem; }
.cx-undo__button {
    border: 1px solid color-mix(in srgb, var(--akili-accent-fg) 45%, transparent);
    background: transparent;
    color: var(--akili-accent-fg);
    font: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    cursor: pointer;
}
.cx-undo__button:hover, .cx-undo__button:focus-visible { background: var(--rz-fill-subtle); }
.cx-undo__button:disabled { opacity: 0.6; cursor: default; }

/* ── Scheduling (2026-11-22, Part 2): the Schedule card's day/time, clash lines, the accept sheet ── */
.cx-schedule-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; }
.cx-schedule-when__day { font-size: 1.35rem; font-weight: 700; line-height: 1.2; color: var(--rz-text-color); }
.cx-schedule-when__time { font-size: 1.1rem; font-weight: 600; color: var(--rz-text-color); }
.cx-schedule-conflict-line {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--rz-warning-darker, var(--rz-warning));
}
.cx-schedule-conflict {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--rz-warning) 55%, transparent);
    background: color-mix(in srgb, var(--rz-warning) 10%, var(--rz-base-background-color));
    color: var(--rz-text-color);
    font-size: 0.875rem;
}
.cx-schedule-conflict .cx-label { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--rz-warning-darker, var(--rz-warning)); }
.cx-schedule-error { font-size: 0.875rem; color: var(--rz-danger); }

/* ── Find a time (2026-11-22, Part 3) ── */
.cx-hours { display: flex; flex-direction: column; gap: 0.6rem; }
.cx-hours__times { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.cx-findtime { position: fixed; z-index: 2001; display: flex; }
/* Phone / tablet: a full-height sheet. Skill rule 3: never under the tab bar — max(), never a sum (the keyboard covers the dock). */
.cx-findtime--sheet {
    inset: 0;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.42);
    /* The app host's banner paints above page-level overlays (seen on the simulator 2026-11-23: the sheet's title and its
       close sat under it), so the sheet starts below the banner there: --maui-header-height and --safe-top exist only in
       the MAUI index.html, on the web both fall back and the sheet keeps its small top gap. (Not keyed on
       body.has-bottom-tab-bar: an immersive page such as the thread drops that class.) */
    padding-top: calc(var(--safe-top, env(safe-area-inset-top, 0px)) + var(--maui-header-height, 0px) + 0.75rem);
    padding-bottom: var(--kb-inset, 0px);
}
body.has-bottom-tab-bar .cx-findtime--sheet {
    padding-bottom: max(var(--kb-inset, 0px), calc(var(--maui-tabbar-height, 56px) + var(--safe-bottom, 0px)));
}
.cx-findtime--sheet .cx-findtime__box {
    width: 100%;
    max-width: 760px;
    height: 100%;
    border-radius: 22px 22px 0 0;
}
/* 1024 px and wider: a panel beside the composer; the thread makes room for it. */
.cx-findtime--panel {
    top: 4rem;
    right: 0;
    bottom: 0;
    width: 24rem;
    z-index: 900;
}
.cx-findtime--panel .cx-findtime__box { width: 100%; height: 100%; border-radius: 0; border-width: 0 0 0 1px; }
@media (min-width: 1024px) { .cx-page--with-panel { padding-right: 24.5rem; } }
.cx-findtime__box {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 0;
    padding: 0.9rem 1rem 1rem;
    background: var(--rz-base-background-color);
    border: 1px solid var(--rz-border-color);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
    color: var(--rz-text-color);
}
.cx-findtime__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.cx-findtime__nav { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.cx-findtime__strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(7.25rem, 1fr);
    gap: 0.5rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 0.25rem;
}
.cx-findtime--panel .cx-findtime__strip { grid-auto-flow: row; grid-auto-columns: auto; }
.cx-findtime__day {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--rz-border-color);
    background: var(--rz-fill-subtle);
    align-self: start;
}
.cx-findtime--panel .cx-findtime__day { flex-direction: row; flex-wrap: wrap; align-items: center; }
.cx-findtime__date { font-size: 0.85rem; color: var(--rz-text-secondary-color); }
.cx-findtime__day.is-workday .cx-findtime__date { font-weight: 700; color: var(--rz-text-color); }
.cx-findtime--panel .cx-findtime__date { flex: 1 0 100%; }
.cx-findtime__busy {
    display: flex;
    flex-direction: column;
    padding: 0.3rem 0.45rem;
    border-radius: 8px;
    border-left: 3px solid var(--rz-border-color);
    background: var(--rz-fill-muted);
    color: var(--rz-text-secondary-color);
    font-size: 0.75rem;
    min-width: 0;
}
.cx-findtime__busy-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-findtime__slot {
    font: inherit;
    font-size: 0.85rem;
    min-height: 36px;
    padding: 0.3rem 0.5rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--akili-accent-fg) 45%, transparent);
    background: transparent;
    color: var(--akili-accent-fg);
    cursor: pointer;
}
.cx-findtime__slot:hover, .cx-findtime__slot:focus-visible { background: color-mix(in srgb, var(--akili-accent-fg) 12%, transparent); }
.cx-findtime__slot.is-active { background: color-mix(in srgb, var(--akili-accent-fg) 18%, transparent); border-color: var(--akili-accent-fg); font-weight: 700; }

/* ── Notes N1 (2026-11-29): note kinds, proposed outputs, the locked note ── */
.cx-note-output { gap: 0.6rem; }
.cx-note-output.is-dropped { background: var(--rz-fill-subtle); }
.cx-note-output.is-dropped .cx-field,
.cx-note-output.is-dropped .cx-note-stepper,
.cx-note-output.is-dropped .cx-note-email,
.cx-note-output.is-dropped > .cx-row,
.cx-note-output.is-dropped > .cx-hint { opacity: 0.55; }
.cx-note-output__head { display: flex; align-items: center; gap: 0.6rem; min-width: 0; cursor: pointer; }
.cx-note-output__head input[type=checkbox] { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; accent-color: var(--akili-accent-fg); }
.cx-note-output__head input[type=checkbox]:disabled { cursor: not-allowed; }
.cx-note-stepper { gap: 0.25rem; }
.cx-note-stepper .cx-quiet { min-width: 2.5rem; min-height: 2.5rem; justify-content: center; border: 1px solid var(--rz-border-color); border-radius: 10px; }
.cx-note-stepper .cx-amount { min-width: 8rem; text-align: center; }
.cx-textarea--short { min-height: 3.2rem; }
.cx-note-email summary { cursor: pointer; overflow-wrap: anywhere; padding: 0.25rem 0; }
.cx-note-email[open] summary { margin-bottom: 0.4rem; }
.cx-note-chips a.cx-chip, .cx-note-chips button.cx-chip { text-decoration: none; cursor: pointer; }
.cx-note-chips a.cx-chip:hover, .cx-note-chips button.cx-chip:hover { background: color-mix(in srgb, var(--akili-accent-fg) 10%, transparent); }
.cx-note-edit { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.5rem 0; border-bottom: 1px solid var(--rz-border-color); }
.cx-note-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.3rem; }
.cx-note-title { font-weight: 600; font-size: 1rem; }
.cx-note-embedded { padding: 0; }
.cx-danger-row.action-sheet__row.action-sheet__row { color: var(--rz-danger); }
.cx-danger-row.action-sheet__row.action-sheet__row .rzi { color: var(--rz-danger); }
.cx-note-row-chips { color: var(--akili-accent-fg); }
.cx-note-list { display: flex; flex-direction: column; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.cx-note-list__row {
    display: flex; align-items: flex-start; gap: 0.6rem; width: 100%; text-align: left; padding: 0.6rem 0.7rem;
    border: 1px solid var(--rz-border-color); border-radius: 12px; background: var(--rz-base-background-color);
    color: var(--rz-text-color); font: inherit; cursor: pointer; min-width: 0;
}
.cx-note-list__row:hover, .cx-note-list__row:focus-visible { border-color: var(--akili-accent-fg); }
.cx-note-list__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; gap: 0.1rem; }
.cx-note-list__title { font-weight: 600; overflow-wrap: anywhere; }
.cx-note-tab { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.cx-note-made { display: inline-flex; align-items: center; gap: 0.35rem; }
.cx-note-made .rzi { font-size: 1.1rem; color: var(--rz-text-secondary-color); }
.cx-note-skipped { display: inline-flex; align-items: flex-start; gap: 0.3rem; }
.cx-note-skipped .rzi { font-size: 1rem; }
.cx-note-head .cx-card__head > .cx-chip { flex: 0 0 auto; overflow: visible; }

/* ── Notes N2 (2026-11-29): intake (new person, parties + conflict check, matter, letters) and hearing (deadlines) ── */
.cx-note-prospect { gap: 0.35rem; padding: 0.6rem 0.7rem; border: 1px dashed var(--rz-border-color); border-radius: 12px; }
.cx-note-prospect .cx-label { display: inline-flex; align-items: center; gap: 0.35rem; }
.cx-note-prospect__row { align-items: flex-start; }
.cx-note-prospect__row > .cx-field { flex: 1 1 12rem; min-width: 0; }
.cx-note-party { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.5rem 0; border-bottom: 1px solid var(--rz-border-color); min-width: 0; }
.cx-note-party:last-child { border-bottom: 0; }
.cx-note-party__name { font-weight: 600; overflow-wrap: anywhere; }
.cx-note-party a.cx-chip { text-decoration: none; }
.cx-note-noconflict { color: var(--rz-success-darker, var(--rz-success)); display: inline-flex; align-items: center; gap: 0.3rem; }
.cx-note-segment { display: inline-flex; border: 1px solid var(--rz-border-color); border-radius: 999px; overflow: hidden; max-width: 100%; }
.cx-note-segment button {
    font: inherit; font-size: 0.9rem; min-height: 40px; padding: 0.3rem 0.9rem; border: 0; background: transparent;
    color: var(--rz-text-color); cursor: pointer; white-space: nowrap;
}
.cx-note-segment button + button { border-left: 1px solid var(--rz-border-color); }
.cx-note-segment button.is-active { background: color-mix(in srgb, var(--akili-accent-fg) 16%, transparent); color: var(--akili-accent-fg); font-weight: 700; }
.cx-chip--blank { color: var(--rz-warning-darker, var(--rz-warning)); border-color: color-mix(in srgb, var(--rz-warning) 55%, transparent);
    background: color-mix(in srgb, var(--rz-warning) 10%, transparent); }
.cx-note-hits { display: flex; flex-direction: column; gap: 0.25rem; }
.cx-letter-template { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--rz-border-color); }
.cx-letter-template:last-child { border-bottom: 0; }
.cx-letter-template summary { cursor: pointer; display: flex; align-items: center; gap: 0.5rem; font-weight: 600; padding: 0.3rem 0; }
.cx-letter-legend { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.cx-letter-legend code { font-size: 0.8rem; padding: 0.1rem 0.35rem; border-radius: 6px; background: var(--rz-fill-muted); color: var(--rz-text-color); }
.cx-note-party .cx-chip, .cx-note-hits .cx-chip { white-space: normal; height: auto; max-width: 100%; overflow-wrap: anywhere; text-align: left; }

/* Keep in touch K1 (2026-12-01): the cadence / mark-touched / first-run sheets' body (rendered inside ActionSheet). */
.kit-sheet { display: flex; flex-direction: column; gap: 0.75rem; padding: 0 1rem 1rem; min-width: 0; }
.kit-sheet__two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 479.98px) { .kit-sheet__two { grid-template-columns: 1fr; } }
.kit-group { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.6rem 0.75rem; border: 1px solid var(--rz-border-color);
    border-radius: 12px; background: var(--rz-base-background-color); color: var(--rz-text-color); cursor: pointer; }
.kit-group input { margin-top: 0.2rem; width: 1.1rem; height: 1.1rem; accent-color: var(--akili-accent-fg); flex-shrink: 0; }
.kit-group__text { display: flex; flex-direction: column; min-width: 0; }
.kit-select { max-width: 11rem; }
/* Keep in touch K2: the key dates sheet (rows + the add/edit form). */
.kit-date { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem; border: 1px solid var(--rz-border-color);
    border-radius: 12px; min-width: 0; }
.kit-date.is-active { border-color: var(--akili-accent-fg); }
.kit-date > .rzi { color: var(--akili-accent-fg); flex-shrink: 0; }
.kit-date__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.kit-date__text .cx-title, .kit-date__text .cx-muted { overflow-wrap: anywhere; }
.kit-date-form { display: flex; flex-direction: column; gap: 0.6rem; padding-top: 0.25rem; border-top: 1px solid var(--rz-border-color); }
.kit-sheet__three { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0.6rem; }
@media (max-width: 379.98px) { .kit-sheet__three { grid-template-columns: 1fr 1fr; } .kit-sheet__three > :first-child { grid-column: 1 / -1; } }
.kit-segment { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.5rem 0; border-top: 1px solid var(--rz-border-color); }
.kit-segment:first-child { border-top: none; }
.kit-segment__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 12rem; }
