/* public/assets/ct-hub-live.css — the hub page's live parts
   For you (what is waiting on this person, answered in place), the inline
   panels, "What's new", "Who's in" and the row chips. Token-driven (ui.css):
   flat surfaces, hairline borders, the accent for what to do next, text on
   an accent fill in --on-accent (never white on a dark-mode accent). */

.ct-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------- For you */
.hubYou { margin-top: 14px; padding: 14px; border: 1px solid var(--ring, #e2e8f0); border-radius: 18px; background: var(--card, #fff); }
.hubYou[hidden] { display: none !important; }
.hubYouTop { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; min-width: 0; }
.hubYouTop h2 { margin: 0; font-size: 1.05rem; font-weight: 750; letter-spacing: -0.01em; }
.hubYouCount { font-size: .8rem; font-weight: 650; color: var(--on-accent, #fff); background: var(--accent, #067a5d); border-radius: 999px; padding: 2px 8px; min-width: 22px; text-align: center; }
.hubYouCount[hidden] { display: none; }

.hubYouWho { margin: 0 0 12px; }
.hubYouWho.is-set { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted, #64748b); }
.hubYouWho.is-set .hubYouWhoT { color: var(--text, #0f172a); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hubYouAsk { margin: 0 0 10px; font-size: .92rem; color: var(--text, #0f172a); line-height: 1.4; }
.hubYouPicks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.hubYou button.hubYouPick, .hubAct button.hubYouPick { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 38px; padding: 4px 12px 4px 4px; border: 1px solid var(--ring, #e2e8f0); border-radius: 999px; background: var(--card, #fff); color: var(--text, #0f172a); font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hubYou button.hubYouPick:hover, .hubAct button.hubYouPick:hover { border-color: var(--ring-strong, #cbd5e1); background: var(--card-soft, #f8fafc); }
.hubYou button.hubYouPick.is-guess { border-color: var(--accent-ink, var(--accent, #067a5d)); box-shadow: inset 0 0 0 1px var(--accent-ink, var(--accent, #067a5d)); }
.hubYou button.hubYouPick.is-other { padding-left: 12px; color: var(--muted, #64748b); font-weight: 550; }
.hubYou button.hubYouPick:focus-visible, .hubAct button.hubYouPick:focus-visible { outline: 2px solid var(--accent-ink, var(--accent, #067a5d)); outline-offset: 2px; }
.hubYou .hubAvatar, .hubAct .hubAvatar { width: 28px; height: 28px; font-size: .72rem; margin: 0; flex: 0 0 auto; }
.hubYouOther { display: flex; gap: 8px; margin: 0; }
.hubYouOther[hidden] { display: none; }
.hubYouOther input { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 16px; }
.hubYou button.hubYouLink, .hubAct button.hubYouLink { all: unset; cursor: pointer; color: var(--accent-ink, var(--accent, #067a5d)); font-size: .86rem; font-weight: 600; white-space: nowrap; }
.hubYou button.hubYouLink:hover, .hubAct button.hubYouLink:hover { text-decoration: underline; }
.hubYou button.hubYouLink:focus-visible, .hubAct button.hubYouLink:focus-visible { outline: 2px solid var(--accent-ink, var(--accent, #067a5d)); outline-offset: 2px; border-radius: 4px; }

.hubYouList { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hubYouItem { border: 1px solid var(--ring, #e2e8f0); border-radius: 14px; background: var(--card, #fff); overflow: hidden; }
.hubYouItem.is-open { border-color: var(--ring-strong, #cbd5e1); }
.hubYou button.hubYouRow { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; min-height: 56px; }
.hubYou button.hubYouRow:hover { background: var(--card-soft, #f8fafc); }
.hubYou button.hubYouRow:focus-visible { outline: 2px solid var(--accent-ink, var(--accent, #067a5d)); outline-offset: -2px; border-radius: 14px; }
.hubYouIco { --ct-tile-size: 34px; flex: 0 0 auto; }
.hubYouB { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.25; }
.hubYouB strong { font-size: .95rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hubYouB small { font-size: .8rem; color: var(--muted, #64748b); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hubYouCta { flex: 0 0 auto; font-size: .84rem; font-weight: 700; color: var(--accent-ink, var(--accent, #067a5d)); background: color-mix(in srgb, var(--accent, #067a5d) 11%, transparent); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
/* The most urgent thing is the one filled button; the rest are quieter. */
.hubYouItem.is-first .hubYouCta { color: var(--on-accent, #fff); background: var(--accent, #067a5d); }
.hubYouItem.is-open .hubYouCta { background: transparent; color: var(--muted, #64748b); padding-inline: 4px; }
.hubYouItem.is-open .hubYouCta::after { content: ' ▴'; }
.hubYouPanel { padding: 0 12px 12px; border-top: 1px solid var(--ring, #e2e8f0); }
.hubYouPanel[hidden] { display: none; }
.hubYouClear { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .92rem; color: var(--text, #0f172a); }
.hubYouClear svg { color: var(--accent-ink, var(--accent, #067a5d)); flex: 0 0 auto; }
.hubYouDone { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hubYouDone a { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 10px; border-radius: 999px; background: var(--card-soft, #f8fafc); border: 1px solid var(--ring, #e2e8f0); color: var(--text, #0f172a); font-size: .8rem; font-weight: 600; text-decoration: none; min-width: 0; }
.hubYouDone a:hover { border-color: var(--ring-strong, #cbd5e1); }
.hubYouDone a svg { color: var(--accent-ink, var(--accent, #067a5d)); flex: 0 0 auto; }
.hubYouDone a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hubYouDone a small { color: var(--muted, #64748b); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12em; }
.hubYouDoneIco { --ct-tile-size: 18px; }
@media (max-width: 420px) { .hubYouDone a small { display: none; } }

/* ------------------------------------------------------------ Row chips */
.hubYouChip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: .74rem; font-weight: 650; line-height: 1.5; vertical-align: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A row's chip says what waits there, quietly: the one filled button on the
   page is the first thing in For you. */
.hubYouChip.is-needs { color: var(--look-accent-text, var(--accent-ink, var(--accent, #067a5d))); background: color-mix(in srgb, currentColor 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 22%, transparent); }
.hubYouChip.is-done { color: var(--accent-ink, var(--accent, #067a5d)); background: color-mix(in srgb, var(--accent, #067a5d) 12%, transparent); }
.hubYouChip.is-info { color: var(--text, #0f172a); background: var(--card-soft, #f1f5f9); }
.hubYouChip svg { flex: 0 0 auto; }
.hubRowStatus .hubYouChip { margin-left: 0; flex: 0 0 auto; }
/* The status text gives way; the chip never does. */
.hubChildCard .hubRowStatus:has(.hubRowLine) { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: visible; text-overflow: clip; }
.hubRowStatus .hubRowLine { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hubRowStatus .hubRowPin { flex: 0 0 auto; }
@media (max-width: 420px) { .hubRowStatus .hubYouChip.is-done, .hubRowStatus .hubYouChip.is-info { display: none; } }

/* Rows view: the inline panel under the row, above its card. */
.hubChildCard > .hubAct { display: none; }
#hubChildrenList[data-view="rows"] .hubChildCard.hubChildCard--expanded > .hubAct { display: block; margin: 0 12px 10px; padding-top: 10px; border-top: 1px solid var(--ring, #e2e8f0); }

/* ------------------------------------------------------------- Panels */
.hubAct { font-size: .92rem; color: var(--text, #0f172a); }
.hubYouPanel .hubAct { padding-top: 10px; }
.hubAct p { margin: 0 0 8px; }
.hubActMeta { color: var(--muted, #64748b); font-size: .84rem; }
.hubActCount { font-size: .9rem; }
.hubActCount strong { font-weight: 700; }
.hubActNote { color: var(--muted, #64748b); font-size: .86rem; }
.hubActSub { margin: 10px 0 6px !important; font-size: .8rem; font-weight: 700; color: var(--muted, #64748b); }
.hubActYou { display: flex; align-items: center; gap: 6px; font-weight: 650; }
.hubActYou.is-done { color: var(--accent-ink, var(--accent, #067a5d)); }
.hubActYou.is-todo { color: var(--text, #0f172a); }
.hubActErr { color: #b42318; font-size: .86rem; font-weight: 600; }
:root[data-theme="dark"] .hubActErr { color: #ff9b8f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hubActErr { color: #ff9b8f; } }
.hubActErr[hidden] { display: none; }
.hubActFoot { margin-top: 6px !important; }

.hubActName, .hubActGuests { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; font-size: .82rem; font-weight: 600; color: var(--muted, #64748b); }
.hubActName small { font-weight: 500; }
.hubActName input, .hubActGuests select { margin: 0; font-size: 16px; width: 100%; }
.hubActCheckline { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; margin: 2px 0 10px; font-size: .86rem; color: var(--text, #0f172a); }
.hubActCheckline input { margin: 0; width: 18px; height: 18px; flex: 0 0 auto; }

.hubActBtns { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.hubAct button.hubActBtn, .hubAct a.hubActBtn, .hubYou button.hubActBtn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--ring-strong, #cbd5e1); background: var(--card, #fff); color: var(--text, #0f172a); font-size: .92rem; font-weight: 650; text-decoration: none; text-align: center; flex: 1 1 auto; }
.hubAct button.hubActBtn:hover, .hubAct a.hubActBtn:hover, .hubYou button.hubActBtn:hover { background: var(--card-soft, #f8fafc); }
.hubAct .hubActBtn.is-primary, .hubYou .hubActBtn.is-primary { background: var(--accent, #067a5d); border-color: var(--accent, #067a5d); color: var(--on-accent, #fff); }
.hubAct .hubActBtn.is-primary:hover, .hubYou .hubActBtn.is-primary:hover { background: var(--accent-hover, var(--accent, #067a5d)); }
.hubAct .hubActBtn.is-on { box-shadow: inset 0 0 0 2px var(--accent-ink, var(--accent, #067a5d)); }
.hubAct .hubActBtn.is-on.is-primary { box-shadow: inset 0 0 0 2px var(--on-accent, #fff); }
.hubAct .hubActBtn.is-small { flex: 0 0 auto; min-height: 36px; padding: 6px 12px; font-size: .84rem; }
.hubAct .hubActBtn:focus-visible, .hubYou .hubActBtn:focus-visible { outline: 2px solid var(--accent-ink, var(--accent, #067a5d)); outline-offset: 2px; }
.hubAct .hubActBtn[disabled], .hubAct button[disabled] { opacity: .55; cursor: default; }
.hubAct.is-busy { opacity: .7; pointer-events: none; }
.hubAct a.hubActOpen { display: inline-flex; gap: 4px; margin-top: 2px; color: var(--accent-ink, var(--accent, #067a5d)); font-size: .86rem; font-weight: 650; text-decoration: none; }
.hubAct a.hubActOpen:hover { text-decoration: underline; }

.hubActOpts, .hubActList { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.hubActList.is-plain li { font-size: .88rem; }
.hubAct button.hubActOpt, .hubActOpt.is-static { all: unset; box-sizing: border-box; position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--ring, #e2e8f0); border-radius: 12px; background: var(--card, #fff); overflow: hidden; }
.hubAct button.hubActOpt { cursor: pointer; }
.hubAct button.hubActOpt:hover { border-color: var(--ring-strong, #cbd5e1); }
.hubAct button.hubActOpt:focus-visible { outline: 2px solid var(--accent-ink, var(--accent, #067a5d)); outline-offset: 2px; }
.hubAct .hubActOpt.is-on { border-color: var(--accent-ink, var(--accent, #067a5d)); box-shadow: inset 0 0 0 1px var(--accent-ink, var(--accent, #067a5d)); }
.hubActOpt > * { position: relative; z-index: 1; }
.hubActOpt .hubActBar { position: absolute; z-index: 0; left: 0; top: 0; bottom: 0; width: calc(var(--w, 0) * 100%); background: color-mix(in srgb, var(--accent, #067a5d) 11%, transparent); pointer-events: none; }
.hubActLabel { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.hubActEmoji { flex: 0 0 auto; font-size: 1.1rem; line-height: 1; }
.hubActFig { flex: 0 0 auto; font-size: .82rem; font-weight: 700; color: var(--muted, #64748b); font-variant-numeric: tabular-nums; }
.hubActLead { flex: 0 0 auto; font-size: .72rem; font-weight: 700; color: var(--accent-ink, var(--accent, #067a5d)); }
.hubActBox { flex: 0 0 auto; width: 20px; height: 20px; border: 1.5px solid var(--ring-strong, #94a3b8); border-radius: 6px; display: grid; place-items: center; color: transparent; }
.hubActOpt.is-on .hubActBox, .hubActCheck.is-on .hubActBox, .hubNoteTodo.is-done .hubActBox { background: var(--accent, #067a5d); border-color: var(--accent, #067a5d); color: var(--on-accent, #fff); }
.hubActOpt.is-when, .hubActOpt.is-rate { flex-wrap: wrap; row-gap: 6px; }
.hubActSegs, .hubActStars { display: inline-flex; gap: 4px; flex: 1 0 100%; }
.hubAct button.hubActSeg { all: unset; box-sizing: border-box; cursor: pointer; flex: 1 1 0; min-height: 36px; padding: 6px 4px; border: 1px solid var(--ring, #e2e8f0); border-radius: 10px; text-align: center; font-size: .82rem; font-weight: 650; color: var(--text, #0f172a); background: var(--card, #fff); }
.hubAct button.hubActSeg.is-on { background: var(--accent, #067a5d); border-color: var(--accent, #067a5d); color: var(--on-accent, #fff); }
.hubAct button.hubActSeg:focus-visible, .hubAct button.hubActStar:focus-visible { outline: 2px solid var(--accent-ink, var(--accent, #067a5d)); outline-offset: 2px; }
.hubAct button.hubActStar { all: unset; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; font-size: 1.3rem; line-height: 1; color: var(--ring-strong, #cbd5e1); border-radius: 8px; }
.hubAct button.hubActStar.is-on { color: #e5a100; }

.hubAct button.hubActCheck { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 6px 10px; border-radius: 10px; }
.hubAct button.hubActCheck:hover { background: var(--card-soft, #f8fafc); }
.hubAct button.hubActCheck:focus-visible { outline: 2px solid var(--accent-ink, var(--accent, #067a5d)); outline-offset: 0; }
.hubAct button.hubActCheck.is-on .hubActLabel { text-decoration: line-through; color: var(--muted, #64748b); }
.hubActSec { margin: 6px 0 0; font-size: .78rem; font-weight: 700; color: var(--muted, #64748b); }

.hubActTask, .hubActPay, .hubActSpot { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 4px 0; border-bottom: 1px solid var(--ring, #e2e8f0); }
.hubActList > li:last-child { border-bottom: 0; }
.hubAct button.hubActRing { all: unset; box-sizing: border-box; cursor: pointer; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50% !important; border: 2px solid var(--ring-strong, #94a3b8); display: grid; place-items: center; color: transparent; }
.hubAct button.hubActRing:hover { border-color: var(--accent-ink, var(--accent, #067a5d)); color: var(--accent-ink, var(--accent, #067a5d)); }
.hubAct button.hubActRing.is-doing { background: linear-gradient(90deg, color-mix(in srgb, var(--accent, #067a5d) 45%, transparent) 50%, transparent 50%); }
.hubAct button.hubActRing.is-on { background: var(--accent, #067a5d); border-color: var(--accent, #067a5d); color: var(--on-accent, #fff); }
.hubAct button.hubActRing:focus-visible { outline: 2px solid var(--accent-ink, var(--accent, #067a5d)); outline-offset: 2px; }
.hubActDue, .hubActOwner { flex: 0 0 auto; font-size: .76rem; font-weight: 650; color: var(--muted, #64748b); white-space: nowrap; }
.hubActDue.is-late { color: #b42318; }
.hubActDue.is-soon { color: var(--accent-ink, var(--accent, #067a5d)); }
:root[data-theme="dark"] .hubActDue.is-late { color: #ff9b8f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hubActDue.is-late { color: #ff9b8f; } }

.hubNoteExcerpt { margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; background: var(--card-soft, #f8fafc); border: 1px solid var(--ring, #e2e8f0); }
.hubNoteExcerpt p { margin: 0 0 4px; font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere; }
.hubNoteExcerpt p:last-child { margin-bottom: 0; }
.hubNoteH { font-weight: 700; }
.hubNoteLi::before { content: '• '; color: var(--muted, #64748b); }
.hubNoteQ { padding-left: 8px; border-left: 3px solid var(--accent, #067a5d); }
.hubNoteTodo { display: flex; align-items: center; gap: 8px; }
.hubNoteTodo .hubActBox { width: 16px; height: 16px; border-radius: 4px; }
.hubNoteTodo.is-done { color: var(--muted, #64748b); text-decoration: line-through; }

/* ------------------------------------------------------------ What's new */
.hubFeedRow { display: flex; align-items: center; gap: 10px; padding: 7px 2px; color: var(--text, #0f172a); text-decoration: none; border-radius: 10px; min-width: 0; }
.hubFeedRow:hover .hubFeedText { text-decoration: underline; }
.hubFeedRow:focus-visible { outline: 2px solid var(--accent-ink, var(--accent, #067a5d)); outline-offset: 2px; }
.hubFeedIco { --ct-tile-size: 28px; flex: 0 0 auto; }
.hubFeedBody { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.3; }
.hubFeedTop { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.hubFeedText { flex: 1 1 auto; min-width: 0; font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.hubFeedWhen { flex: 0 0 auto; font-size: .78rem; color: var(--muted, #64748b); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hubFeedMeta { font-size: .78rem; color: var(--muted, #64748b); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hubFeedNew { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-ink, var(--accent, #067a5d)); }
.hubFeedHeadNew { font-weight: 600; color: var(--accent-ink, var(--accent, #067a5d)); margin-left: 6px; }

/* ------------------------------------------------------------- Who's in */
.hubWhoInTable td { text-align: center; }
.hubWhoInTable th.hubWhoInName { text-align: left; font-weight: 600; color: var(--text, #0f172a); font-size: .88rem; }
.hubWhoInTable th.hubWhoInEv.is-past { opacity: .6; }
.hubWhoInMark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .72rem; font-weight: 800; }
.hubWhoInYes .hubWhoInMark { background: var(--accent, #067a5d); color: var(--on-accent, #fff); }
.hubWhoInMaybe .hubWhoInMark { background: color-mix(in srgb, var(--accent, #067a5d) 16%, transparent); color: var(--accent-ink, var(--accent, #067a5d)); }
.hubWhoInCant .hubWhoInMark { background: var(--card-soft, #f1f5f9); color: var(--muted, #64748b); }
.hubWhoInWait .hubWhoInMark { border: 1.5px dashed var(--accent-ink, var(--accent, #067a5d)); color: var(--accent-ink, var(--accent, #067a5d)); }
.hubWhoInNo .hubWhoInMark { color: var(--muted, #94a3b8); }

/* -------------------------------------------------------------- Toast */
.hubToast { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 70; display: flex; align-items: center; gap: 12px; max-width: min(520px, calc(100vw - 24px)); padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--text, #0f172a); color: var(--bg, #fff); font-size: .9rem; font-weight: 550; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
/* The toast never swallows a tap meant for what is under it; only Undo takes one. */
.hubToast.is-on { opacity: 1; transform: translate(-50%, 0); }
.hubToast.is-on button { pointer-events: auto; }
.hubToast span { min-width: 0; }
.hubToast button { all: unset; cursor: pointer; flex: 0 0 auto; font-weight: 750; color: var(--bg, #fff); text-decoration: underline; text-underline-offset: 3px; padding: 4px 6px; border-radius: 6px; }
.hubToast button:focus-visible { outline: 2px solid var(--bg, #fff); }
@media (prefers-reduced-motion: reduce) { .hubToast { transition: none; } }

/* ---------------------------------------------------------- Plan reminders */
.hubRemind { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--ring, #e2e8f0); font-size: .88rem; color: var(--muted, #64748b); }
.hubRemind[hidden] { display: none; }
.hubRemind .hubActBtn { flex: 0 0 auto; }
