/* v14: the welcome band after the owner's reference (greeting, drop-downs, today's agenda), the Sorotan stack that is swiped
   up and down, the quick-add box and "Add task" rows, the + settings, Talk to AI, departments on tasks, the sidebar tools,
   and the owner's Home by department. Loads after css/v10.css. */

/* ---------- welcome band ---------- */
.stg.wl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); grid-template-areas: "t ag" "f ag"; gap: 22px 32px; padding: 32px 34px 28px; min-height: 0; }
.stg.wl .stg-t { grid-area: t; }
.wl-f { grid-area: f; align-self: end; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fsel { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 30px 0 13px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font-size: 13.5px; font-weight: 560; cursor: pointer; transition: background var(--t-2), border-color var(--t-2); }
.fsel:hover { background: rgba(255, 255, 255, .14); }
.fsel:focus-within { border-color: #A9C0FF; box-shadow: 0 0 0 3px rgba(169, 192, 255, .30); }
.fsel.on { background: rgba(169, 192, 255, .22); border-color: rgba(169, 192, 255, .55); }
.fsel > .i:first-child { width: 15px; height: 15px; color: #A9C0FF; flex: none; }
.fsel select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; outline: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; max-width: 170px; }
.fsel select option { color: #0B1228; background: #fff; }
.fsel .fs-c { position: absolute; right: 11px; width: 14px; height: 14px; pointer-events: none; color: rgba(255, 255, 255, .8); }
.fs-x { width: 38px; height: 38px; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .08); }

/* today's agenda: the reference's "Today note" card. Small, sits at the top right, a blue glow behind the heading */
.wl-ag { grid-area: ag; align-self: start; position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 12px; min-width: 0; padding: 16px 16px 14px 18px; border-radius: 22px;
  background: radial-gradient(120% 90% at 50% -10%, rgba(79, 123, 255, .62), rgba(79, 123, 255, .16) 55%, transparent 80%), linear-gradient(180deg, rgba(20, 32, 78, .72), rgba(10, 16, 44, .78));
  border: 1px solid rgba(169, 192, 255, .30); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 18px 40px -22px rgba(30, 64, 200, .7); }
.ag-h { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.ag-h b { font-size: 16px; font-weight: 650; color: #fff; letter-spacing: -.01em; }
.ag-n { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.ag-pen { margin-left: auto; width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
  background: rgba(6, 12, 34, .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); transition: background var(--t-2), transform var(--t-2) var(--ease-out); }
.ag-pen:hover { background: rgba(6, 12, 34, .8); }
.ag-pen:active { transform: scale(.92); }
.ag-pen .i { width: 15px; height: 15px; }
.ag-b { min-width: 0; }
.ag-txt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; padding-left: 12px; border-left: 2px solid rgba(169, 192, 255, .55);
  font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .62); text-decoration: none; overflow-wrap: anywhere; }
.ag-txt b { color: #fff; font-weight: 600; }
a.ag-txt:hover { text-decoration: none; color: rgba(255, 255, 255, .78); }
a.ag-txt:hover b { text-decoration: underline; text-underline-offset: 3px; }
.ag-m { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }
.ag-w { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: rgba(255, 255, 255, .78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-w .i { width: 15px; height: 15px; flex: none; color: #A9C0FF; }
.ag-w.late, .ag-w.late .i { color: #FF9B8F; }
.ag-p { display: inline-flex; align-items: center; flex: none; height: 36px; padding: 3px; border-radius: 999px; background: rgba(6, 12, 34, .5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.ag-go { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600;
  color: #fff; background: rgba(255, 255, 255, .12); text-decoration: none; transition: background var(--t-2); }
.ag-go:hover { background: rgba(255, 255, 255, .2); text-decoration: none; }
.ag-go .i { width: 14px; height: 14px; color: #6EE7A8; }
.ag-go.on { background: rgba(110, 231, 168, .25); }
.ag-sep { width: 1px; height: 16px; margin: 0 2px 0 4px; background: rgba(255, 255, 255, .18); }
.ag-nx { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: rgba(255, 255, 255, .85); cursor: pointer; transition: background var(--t-2); }
.ag-nx:hover { background: rgba(255, 255, 255, .12); }
.ag-nx .i { width: 15px; height: 15px; }
:root:not([data-motion="low"]) .ag-b { animation: ag-in 260ms var(--ease-out); }
@keyframes ag-in { from { opacity: 0; transform: translateY(4px); } }

@media (max-width: 980px) {
  .stg.wl { grid-template-columns: minmax(0, 1fr); grid-template-areas: "t" "f" "ag"; padding: 24px 22px 20px; gap: 18px; }
}
@media (max-width: 640px) {
  .stg.wl { padding: 18px 14px 14px; gap: 14px; border-radius: 24px; }
  .wl-f { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; }
  .wl-f::-webkit-scrollbar { display: none; }
  .fsel { flex: none; height: 40px; }
  .wl-ag { padding: 14px 14px 12px 16px; border-radius: 20px; }
}

/* ---------- Sorotan: a stack swiped up and down ---------- */
.ins-h .ibtn:disabled { opacity: .35; cursor: default; }
.ins-deck { min-height: 248px; touch-action: pan-x; user-select: none; -webkit-user-select: none; overscroll-behavior: contain; cursor: grab; }
.ins-deck.drag { cursor: grabbing; }
.in-c { inset: 0 0 24px 0; }
.in-c[data-p="0"] { transform: none; }
.in-c[data-p="1"] { transform: translateY(12px) scale(.955); }
.in-c[data-p="2"] { transform: translateY(24px) scale(.91); }
.in-c[data-p="-1"] { z-index: 4; opacity: 0; visibility: hidden; transform: translateY(-46%) scale(.94); transition: transform 420ms var(--ease-out), opacity 300ms var(--ease-out), visibility 0s linear 420ms; }
.in-c:not([data-p="0"]):not([data-p="1"]):not([data-p="2"]):not([data-p="-1"]) { opacity: 0; visibility: hidden; transform: translateY(30px) scale(.88); }
.ins-deck.drag .in-c[data-p="0"] { transition: none; }
.ins-dots { position: absolute; right: -14px; top: 50%; transform: translateY(-60%); display: grid; gap: 5px; z-index: 5; }
.ins-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-4); opacity: .45; transition: height 260ms var(--ease-out), opacity 200ms; }
.ins-dots i.on { height: 16px; border-radius: 3px; opacity: 1; background: var(--brand, #4F7BFF); }
.ins-hint { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-3); pointer-events: none; transition: opacity 300ms; }
.ins-hint .i { width: 13px; height: 13px; }
:root:not([data-motion="low"]) .ins-deck:not(.used) .ins-hint .i { animation: ins-nudge 1.6s var(--ease-out) infinite; }
.ins-deck.used .ins-hint { opacity: 0; }
@keyframes ins-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (hover: hover) and (pointer: fine) { .ins-hint { display: none; } }
@media (max-width: 640px) { .ins-dots { right: -9px; } }
:root[data-motion="low"] .in-c { transition: opacity 120ms linear; }

/* ---------- quick add (+ and "Add task") ---------- */
.pop.qadd { top: 18vh; left: 50%; width: min(620px, calc(100vw - 32px)); margin-left: calc(min(620px, calc(100vw - 32px)) / -2); padding: 0; transform-origin: top center; overflow: visible; }
.app[data-over="qadd"] .scrim { opacity: .45; }
.qa { display: grid; gap: 4px; padding: 12px 14px 10px; }
.qa-t, .qa-d { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; padding: 4px 2px; }
.qa-t { font-size: 16px; font-weight: 600; }
.qa-d { font-size: 13.5px; color: var(--ink-2); }
.qa-t::placeholder, .qa-d::placeholder { color: var(--ink-4); font-weight: 450; }
.qa .q-read { margin: 2px 0 0; grid-area: auto; }
.qa .q-read span { color: var(--ink); background: color-mix(in oklab, var(--brand, #4F7BFF) 18%, transparent); border: 1px solid color-mix(in oklab, var(--brand, #4F7BFF) 40%, transparent); }
.qa-c { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 10px; }
.qa-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--ink-2); font-size: 13px; cursor: pointer; background: var(--panel); }
.qa-chip:focus-within { border-color: var(--brand, #4F7BFF); box-shadow: var(--focus); }
.qa-chip .i { width: 14px; height: 14px; flex: none; }
.qa-chip input, .qa-chip select { border: 0; outline: 0; background: transparent; color: inherit; font: inherit; max-width: 150px; color-scheme: inherit; }
.qa-chip select option { color: #0B1228; background: #fff; }
.qa-f { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.qa-sp { flex: 1; }
.qa.inline { margin-top: 6px; border-radius: var(--r-l); background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--sh-2); }
.addrow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-radius: 14px; background: transparent; color: var(--ink-3); font: inherit; font-size: 14px; font-weight: 520; cursor: pointer; text-align: left; transition: color var(--t-2), background var(--t-2); }
.addrow .i { width: 18px; height: 18px; padding: 2px; border-radius: 50%; color: var(--brand, #4F7BFF); transition: background var(--t-2), color var(--t-2); }
.addrow:hover { color: var(--brand, #4F7BFF); background: var(--hover); }
.addrow:hover .i { background: var(--brand, #4F7BFF); color: #fff; }
@media (max-width: 640px) {
  .pop.qadd { top: auto; bottom: 0; left: 0; right: 0; width: auto; margin: 0; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); transform-origin: bottom center; }
  .qa-t { font-size: 17px; }
  .qa-c { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .qa-chip { flex: none; height: 36px; }
}

/* ---------- + settings ---------- */
.plus-g { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.plus-g .chip { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; }
.plus-g .chip .i { width: 15px; height: 15px; }

/* ---------- Talk to AI ---------- */
.ai-w { display: grid; gap: 18px; max-width: 920px; }
.ai-ask .btnrow { align-items: center; }
.ai-mic.rec { color: #fff; background: var(--err-fill, #E5484D); border-color: transparent; }
:root:not([data-motion="low"]) .ai-mic.rec .i { animation: ai-pulse 1.1s ease-in-out infinite; }
@keyframes ai-pulse { 50% { transform: scale(1.25); } }
.ai-r { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.ai-r:first-of-type { border-top: 0; }
.ai-rh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ai-b { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.ai-res { padding: 10px 12px; border-radius: 12px; background: color-mix(in oklab, #8B5CF6 10%, transparent); border: 1px solid color-mix(in oklab, #8B5CF6 28%, transparent); }
.ai-res b { font-size: 12.5px; color: #A78BFA; }
.ai-res p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; margin-top: 2px; }
.ai-r.st-working { box-shadow: inset 3px 0 0 var(--brand, #4F7BFF); padding-left: 12px; }

/* ---------- sidebar tools under each screen ---------- */
.navl, .dr-nav { align-content: start; }
.nav-i:has(+ .nav-x) { padding-right: 38px; }
.nav-x { justify-self: end; position: relative; z-index: 1; width: 30px; height: 30px; margin: -35px 5px 5px 0; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--ink-4); cursor: pointer; transition: background var(--t-2), color var(--t-2); }
.dr-nav .nav-x { margin-top: -38px; width: 36px; height: 36px; }
.nav-x:hover { background: var(--hover); color: var(--ink); }
.nav-x .i { width: 14px; height: 14px; transition: transform var(--t-3) var(--ease-out); transform: rotate(-90deg); }
.nav-x.open .i { transform: none; }
.nav-sub { display: grid; gap: 1px; margin: 0 0 6px 27px; padding-left: 12px; border-left: 1px solid var(--line-2); }
.nav-s { display: block; width: 100%; text-align: left; height: 32px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-3); font: inherit; font-size: 13px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background var(--t-1), color var(--t-1); }
.dr-nav .nav-s { height: 40px; font-size: 14px; }
.nav-s:hover { background: var(--hover); color: var(--ink); }
.nav-s.on { color: var(--ink); font-weight: 600; background: color-mix(in oklab, var(--brand, #4F7BFF) 14%, transparent); }

/* ---------- owner Home by department ---------- */
.depts { display: grid; gap: 22px; }
.dept-s { display: grid; gap: 12px; }
.dept-h { display: flex; align-items: center; gap: 12px; }
.dept-h h4 { font-size: 15px; font-weight: 650; white-space: nowrap; }
.dept-h > i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.dept-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.dept-g .md { min-width: 0; }
@media (max-width: 640px) { .dept-g { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .dept-g .md { min-height: 132px; padding: 13px 12px 11px; } }

@media (forced-colors: active) { .fsel, .wl-ag, .ag-p, .qa-chip, .nav-s.on, 
.cr-i { border: 1px solid CanvasText; } }

/* fixes after the first screenshots: agenda rows stay inside their card on a phone; the sidebar keeps room on the right
   for the highlighted item and its badge when the list is long enough to scroll */
.wl-ag { grid-template-columns: minmax(0, 1fr); }
/* one column no wider than the sidebar: a long tool name is cut with an ellipsis instead of widening the column */
.navl, .dr-nav { grid-template-columns: minmax(0, 1fr); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.nav-sub, .nav-s { min-width: 0; }

/* ---------- the + button and its short menu ---------- */
.pop.create { width: 280px; padding: 8px; border-radius: 20px; }
#create { max-height: none; overflow: visible; }
.cr-g { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cr-i { display: grid; justify-items: start; gap: 10px; min-height: 84px; padding: 12px; border: 0; border-radius: 14px; cursor: pointer; text-align: left; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.25;
  color: var(--ink); background: var(--hover); transition: background var(--t-2), transform var(--t-2) var(--ease-out); }
.cr-i:hover, .cr-i:focus-visible { background: color-mix(in oklab, var(--brand, #4F7BFF) 18%, transparent); outline: 0; }
.cr-i:active { transform: scale(.97); }
.cr-i i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--brand, #4F7BFF); }
.cr-i i .i { width: 16px; height: 16px; }
.cr-g:has(> .cr-i:only-child) { grid-template-columns: 1fr; }
.cr-set { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 10px 8px 4px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); text-decoration: none; }
.cr-set:hover { color: var(--ink); text-decoration: none; }
.cr-set .i { width: 14px; height: 14px; }
@media (max-width: 640px) { .pop.create { width: min(320px, calc(100vw - 32px)); margin-left: calc(min(320px, calc(100vw - 32px)) / -2); } .cr-i { min-height: 92px; font-size: 14px; } }
/* the underline on the agenda title is for a mouse only; a tap does not leave it behind */
@media not (hover: hover) { a.ag-txt:hover b { text-decoration: none; } }

/* ---------- v14b: the agenda on the dashboard row, Sorotan as a visible stack, green beside the blue ---------- */
.stg.wl { grid-template-columns: minmax(0, 1fr); grid-template-areas: "t" "f"; padding-block: 28px 24px; }
.lead { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.lead .wl-ag { grid-area: auto; align-self: stretch; grid-template-rows: auto 1fr auto; gap: 14px; padding: 20px 20px 18px 22px; margin-bottom: 22px; overflow: visible; }
.lead .ag-h b { font-size: 17px; }
.ag-b { display: grid; align-content: start; gap: 10px; }
.ag-k { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.ag-k .i { width: 14px; height: 14px; color: #A9C0FF; }
.lead .ag-txt { font-size: 15px; -webkit-line-clamp: 4; }
.lead .ag-txt b { font-size: 19px; font-weight: 650; letter-spacing: -.015em; line-height: 1.3; display: block; margin-bottom: 4px; }
/* the cards behind: two edges under the front card, drawn as shadows (a glass card is its own layer, so nothing can sit behind it) */
.lead .wl-ag.st1 { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 12px 0 -6px rgb(16, 26, 66), 0 12px 0 -5px rgba(169, 192, 255, .28), 0 30px 40px -22px rgba(30, 64, 200, .6); }
.lead .wl-ag.st2 { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 12px 0 -6px rgb(16, 26, 66), 0 12px 0 -5px rgba(169, 192, 255, .28), 0 24px 0 -12px rgb(12, 19, 50), 0 24px 0 -11px rgba(169, 192, 255, .16), 0 36px 40px -22px rgba(30, 64, 200, .6); }
/* Sorotan: the next two cards show their lower edge under the front one */
.in-c[data-p="1"], .in-c[data-p="2"] { transform-origin: 50% 100%; }
.in-c[data-p="1"] { transform: translateY(11px) scaleX(.94) scaleY(.97); opacity: .75; }
.in-c[data-p="2"] { transform: translateY(22px) scaleX(.88) scaleY(.94); opacity: .45; }
@media (max-width: 980px) { .lead { grid-template-columns: minmax(0, 1fr); } .lead .wl-ag { order: -1; } }

/* green beside the blue: on the dashboard every accent that was orange, yellow, purple, teal or pink is a sporty green;
   blue stays blue, and red stays for late and errors */
.hm { --d-fin: #1FB35A; --d-ops: #12A150; --d-svc: #0E9F5A; --d-sal: #22C55E; --d-mkt: #16A34A; --d-cmp: #15803D; --d-hr: #1FB35A; --d-ppl: #1FB35A;
  --c2: #22C55E; --c3: #16A34A; --c4: #4ADE80; }
:root[data-theme="dark"] .hm { --d-fin: #34E07A; --d-ops: #22D46B; --d-svc: #2BD98A; --d-sal: #3BEA82; --d-mkt: #1FC765; --d-cmp: #5BE89A; --d-hr: #34E07A; --d-ppl: #34E07A;
  --c2: #34E07A; --c3: #22C55E; --c4: #86EFAC; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hm { --d-fin: #34E07A; --d-ops: #22D46B; --d-svc: #2BD98A; --d-sal: #3BEA82; --d-mkt: #1FC765; --d-cmp: #5BE89A; --d-hr: #34E07A; --d-ppl: #34E07A; --c2: #34E07A; --c3: #22C55E; --c4: #86EFAC; } }
/* the front agenda card is solid so the cards behind show only at its lower edge */
.lead .wl-ag { background: radial-gradient(120% 70% at 50% -10%, rgba(79, 123, 255, .55), rgba(79, 123, 255, .12) 55%, transparent 80%), linear-gradient(180deg, rgb(22, 34, 82), rgb(12, 19, 50)); }
/* ---------- Settings: install the app ---------- */
.app-l { list-style: none; display: grid; gap: 6px; margin: 10px 0 12px; padding: 0; font-size: 13.5px; color: var(--ink-2); }
.app-l li { display: flex; align-items: center; gap: 8px; }
.app-l .i { width: 15px; height: 15px; color: var(--brand, #4F7BFF); flex: none; }
/* ---------- files: the Open button (Drive or the app's own view; the address is never shown) ---------- */
button.fk, button.att-th { border: 0; cursor: pointer; font: inherit; padding: 0; }
button.att-th { width: 100%; color: inherit; }
.fname { display: block; max-width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fname:hover b { text-decoration: underline; text-underline-offset: 3px; }
.fa .fopen { min-height: 34px; padding: 0 12px; gap: 6px; margin-right: 4px; }
.fa .fopen .i { width: 14px; height: 14px; }
@media (max-width: 640px) { .fa .fopen span { display: none; } .fa .fopen { width: 38px; padding: 0; justify-content: center; } }
.frow .fa .fopen, .frow .fa .fopen:hover { color: var(--pri-ink); background: var(--pri); border-color: transparent; opacity: 1; }
.frow .fa .fopen:hover { background: #4470FF; }
.frow .fa .fopen .i { color: #fff; }
/* Open is always fully visible; download and delete stay quiet until the row is pointed at. On touch the Open button
   stays on the row (the tray keeps download and delete) */
@media (hover: hover) and (pointer: fine) {
  .frow .fa { opacity: 1; }
  .frow .fa > :not(.fopen) { opacity: .5; transition: opacity var(--t-2); }
  .frow:hover .fa > *, .frow:focus-within .fa > * { opacity: 1; }
}
@media (hover: none) {
  .frow .fa { display: flex; }
  .frow .fa > :not(.fopen) { display: none; }
  .fr-tray .fr-t.op { display: none; }
  .frow .fa .fopen { width: auto; min-height: 40px; padding: 0 14px; }
  .frow .fa .fopen span { display: inline; }
}
.fr-t.op { background: var(--pri); color: var(--pri-ink); }

/* ---------- + menu v2 (2026-11-17): a list of pill choices; on a phone they stack above the + like a speed dial ---------- */
.cr-l { display: grid; gap: 6px; }
.cr-p { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 18px 8px 8px; border: 0; border-radius: 999px; cursor: pointer; text-align: left;
  font: 600 15px/1.2 var(--font); color: var(--ink); background: var(--hover); transition: background var(--t-2), transform var(--t-2) var(--ease-out); }
.cr-p:hover, .cr-p:focus-visible { background: color-mix(in oklab, var(--pri-bg) 18%, transparent); outline: 0; }
.cr-p:active { transform: scale(.97); }
.cr-p i { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--pri-ink); background: var(--pri-bg); }
.cr-p i .i { width: 18px; height: 18px; }
.cr-p span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (forced-colors: active) { .cr-p { border: 1px solid CanvasText; } }
@media (max-width: 640px) {
  .pop.create { left: auto; right: 16px; margin-left: 0; width: auto; max-width: calc(100vw - 32px); padding: 0; border: 0; background: transparent; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; bottom: calc(160px + env(safe-area-inset-bottom)); transform-origin: bottom right; }
  .pop.create .cr-l { justify-items: end; gap: 10px; }
  .pop.create .cr-p { min-height: 54px; padding: 8px 22px 8px 10px; background: var(--panel-solid); box-shadow: 0 10px 28px -10px rgba(0, 0, 0, .45), 0 0 0 1px var(--line); font-size: 16px; }
  .pop.create .cr-set { justify-content: flex-end; margin-top: 10px; padding: 8px 6px; border: 0; color: var(--ink); text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
  [data-over="create"] .fab { transform: rotate(45deg); }
}

/* ---------- Talk to AI popup (2026-11-17): the robot beside the bell ---------- */
.ai-ib .i { width: 20px; height: 20px; }
.pop.aipop { top: 60px; right: 64px; width: min(400px, calc(100vw - 24px)); padding: 0; border-radius: 20px; overflow: hidden; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); max-height: min(560px, calc(100vh - 80px)); }
.aip-h { display: flex; align-items: center; gap: 10px; padding: 12px 10px 8px 16px; }
.aip-h > .i { width: 20px; height: 20px; color: var(--pri-bg); }
.aip-h b { flex: 1; min-width: 0; font-size: 15px; font-weight: 650; }
.aip-f { display: grid; gap: 8px; padding: 0 14px 12px; }
.aip-f textarea { width: 100%; min-height: 84px; resize: vertical; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2, var(--line)); background: var(--panel-sunk); color: var(--ink); font: 400 14.5px/1.45 var(--font); }
.aip-f textarea:focus { outline: 0; box-shadow: var(--focus); }
.aip-b { display: flex; align-items: center; gap: 8px; }
.aip-b .ai-mic.rec { color: var(--err); background: var(--err-soft); }
.aip-t { padding: 8px 16px 4px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.aip-l { overflow-y: auto; overscroll-behavior: contain; padding: 4px 14px 14px; display: grid; gap: 8px; align-content: start; }
.aip-l .ai-r { padding: 10px 12px; border-radius: 14px; background: var(--panel-sunk); }
.aip-l .ai-b { margin: 6px 0 0; font-size: 13.5px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.aip-l .ai-res p { font-size: 13px; overflow-wrap: anywhere; }
.aip-none { padding: 6px 2px; margin: 0; }
@media (max-width: 640px) {
  .pop.aipop { top: auto; right: 8px; left: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom)); max-height: calc(100vh - 90px); transform-origin: bottom center; }
}

/* ---------- phone fixes (2026-11-17) ---------- */
@media (max-width: 720px) {
  /* the title keeps its room: screen buttons go to their own row under it instead of squeezing it to one letter */
  .top { flex-wrap: wrap; row-gap: 8px; }
  .top > .ttl { flex: 1 1 0; min-width: 0; }
  .top > .ttl h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-acts { order: 10; flex: 1 0 100%; flex-wrap: wrap; justify-content: flex-start; }
  .top-acts:empty { display: none; }
  .top-acts .btn.sm, .top-acts .btn.sm:has(> .lbl) { width: auto; padding: 0 14px; }
  .top-acts .btn .lbl { display: inline; }
  /* the + floats above the tab bar: the end of every page scrolls clear of it */
  .page { padding-bottom: calc(176px + env(safe-area-inset-bottom)); }
  /* Catat cepat: the inline form gives way to the full-screen one from + (or a tap on an account tile) */
  .fin-qcard:has(.cq) { display: none; }
  .fin-cols:has(.fin-qcard .cq) { grid-template-columns: minmax(0, 1fr); }
  .sheet.full, .sheet.wide.full { top: 0; max-height: none; height: 100dvh; border-radius: 0; padding-top: env(safe-area-inset-top); }
  .sheet.full .sheet-b { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .cq-seg button { font-size: 13px; letter-spacing: 0; padding: 0 4px; }
  .cq-p select { font-size: 14px; letter-spacing: 0; }
}
/* a person's name in a table cell is cut with an ellipsis instead of running under the next column */
.row .who, .tbl .who { min-width: 0; overflow: hidden; }
.row .who > span:last-child, .tbl .who > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row > *, .tbl .row > * { min-width: 0; }
