/* Sharing: Share sheet, Shared with me, shared project list, Incoming tray, Agents. Calm, few boxes, blue only for primary actions. */
.share-dialog { width: min(560px, calc(100vw - 32px)); max-height: min(86dvh, 820px); padding: 20px 20px 22px; border: 1px solid var(--o-line-strong, #333338); border-radius: 18px; background: var(--o-raise, #121214); color: var(--o-ink, #f4f4f5); overflow: auto; }
.share-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.share-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.share-head h2 { margin: 0; font-size: 21px; font-weight: 650; line-height: 1.25; }
.share-head p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--o-muted, #a1a1aa); }
.share-x { flex: none; width: 36px; height: 36px; border: 0; border-radius: 999px; background: none; color: var(--o-muted, #a1a1aa); font-size: 22px; cursor: pointer; }
.share-x:hover { background: var(--o-raise-2, #1a1a1d); color: var(--o-ink, #f4f4f5); }
.share-dialog h3 { margin: 22px 0 8px; font-size: 13px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; color: var(--o-muted, #a1a1aa); }
.share-label { display: block; margin: 0 0 6px; font-size: 14px; color: var(--o-ink-2, #d4d4d8); }
.share-dialog input[type="email"], .share-dialog input:not([type]), .share-dialog input[type="date"], .share-dialog select, .share-link { box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--o-line-strong, #333338); border-radius: 10px; background: var(--o-raise-2, #1a1a1d); color: var(--o-ink, #f4f4f5); font: inherit; font-size: 16px; }
.share-projects { margin: 14px 0 0; padding: 0; list-style: none; }
.share-projects li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--o-line, #232326); }
.share-projects li:last-child { border-bottom: 0; }
.share-projects select { width: auto; min-height: 34px; padding: 4px 28px 4px 10px; border-radius: 999px; font-size: 14px; }
.share-projects li:has(input:not(:checked)) select { opacity: .45; }
.share-projects.static li { min-height: 44px; }
.share-projects.static small { color: var(--o-muted, #a1a1aa); }
.share-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; cursor: pointer; }
.share-check input { width: 20px; height: 20px; accent-color: var(--o-accent, #3b9eff); }
.share-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--shared-color, var(--o-accent, #3b9eff)); }
.share-hint { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--o-muted, #a1a1aa); }
.share-hint code { font-size: 12.5px; word-break: break-all; color: var(--o-ink-2, #d4d4d8); }
.share-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 0; }
.share-actions button, .share-mail { min-height: 40px; padding: 0 16px; border: 1px solid var(--o-line-strong, #333338); border-radius: 999px; background: none; color: var(--o-ink, #f4f4f5); font: inherit; font-size: 15px; text-decoration: none; display: inline-flex; align-items: center; cursor: pointer; }
.share-actions button.primary, .share-dialog form button.primary { border-color: transparent; background: var(--o-accent, #3b9eff); color: #fff; font-weight: 600; }
.share-actions button.danger { margin-left: auto; border-color: transparent; color: var(--o-p1, #ff7b7b); }
.share-actions button.quiet { margin-left: 0; padding: 0 4px; font-size: 14px; }
.share-actions button:disabled { opacity: .55; cursor: default; }
.share-result { margin: 14px 0 0; padding: 14px; border-radius: 12px; background: var(--o-accent-soft, rgba(59, 158, 255, .14)); font-size: 14.5px; line-height: 1.45; }
.share-result p { margin: 0 0 10px; }
.share-people { margin: 0; padding: 0; list-style: none; }
.share-people li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--o-line, #232326); }
.share-people li div { display: grid; gap: 2px; min-width: 0; }
.share-people small { font-size: 13.5px; color: var(--o-muted, #a1a1aa); }
.share-people button:not(.share-quiet) { flex: none; min-height: 36px; padding: 0 14px; border: 1px solid var(--o-line-strong, #333338); border-radius: 999px; background: none; color: var(--o-ink, #f4f4f5); font: inherit; font-size: 14px; cursor: pointer; }
.share-toggles { margin: 12px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--o-muted, #a1a1aa); }
.share-toggles li:not(:has(em)) { display: none; }
.share-toggles em { margin-left: 8px; font-style: normal; color: var(--o-ink-2, #d4d4d8); }
.share-newkey { display: grid; gap: 10px; margin: 14px 0 0; }
.share-newkey button { justify-self: start; min-height: 40px; padding: 0 18px; border-radius: 999px; font: inherit; font-size: 15px; cursor: pointer; }

/* Shared project list */
.shared-add { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.shared-add input[type="date"] { width: 150px; }
.shared-add button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; font: inherit; font-size: 15px; cursor: pointer; }
@media (max-width: 520px) { .shared-add { grid-template-columns: 1fr auto; } .shared-add input[type="date"] { width: auto; } .shared-add button { grid-column: 1 / -1; } }
.shared-list { margin: 12px 0 0; padding: 0; list-style: none; }
.shared-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--o-line, #232326); }
.shared-list li div { display: grid; gap: 2px; }
.shared-list .shared-title { font-size: 16px; line-height: 1.35; }
.shared-list small { font-size: 13px; color: var(--o-muted, #a1a1aa); }
.shared-list li.done .shared-title { color: var(--o-muted, #a1a1aa); text-decoration: line-through; }
.shared-list.pending .shared-title { color: var(--o-ink-2, #d4d4d8); }
.shared-list.pending li { display: grid; gap: 2px; padding: 8px 0; }
.shared-list .task-check { flex: none; box-sizing: border-box; width: 22px; height: 22px; min-width: 22px; min-height: 22px; padding: 0; aspect-ratio: 1; margin-top: 1px; border: 2px solid var(--o-line-strong, #333338); border-radius: 50%; background: none; cursor: pointer; }
.shared-list .task-check[aria-checked="true"] { border-color: var(--o-accent, #3b9eff); background: var(--o-accent, #3b9eff); }
.shared-empty { padding: 16px 0; color: var(--o-muted, #a1a1aa); font-size: 14.5px; }

/* Incoming tray */
.incoming-list { margin: 0; padding: 0; list-style: none; }
.incoming-list li { padding: 14px 0 16px; border-bottom: 1px solid var(--o-line, #232326); }
.incoming-list li[aria-busy="true"] { opacity: .6; }
.incoming-from { margin: 0; font-size: 13.5px; color: var(--o-muted, #a1a1aa); }
.incoming-what { margin: 4px 0 0; font-size: 17px; font-weight: 600; line-height: 1.35; }
.incoming-note, .incoming-meta { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--o-ink-2, #d4d4d8); }
.incoming-list .share-actions { margin-top: 10px; }
.incoming-more { position: relative; margin-left: auto; }
.incoming-more > summary { display: grid; place-items: center; min-width: 40px; min-height: 40px; border-radius: 999px; color: var(--o-muted, #a1a1aa); list-style: none; cursor: pointer; }
.incoming-more > summary::-webkit-details-marker { display: none; }
.incoming-more > div { position: absolute; right: 0; top: 44px; z-index: 5; display: grid; min-width: 240px; padding: 6px; border: 1px solid var(--o-line-strong, #333338); border-radius: 12px; background: var(--o-raise-2, #1a1a1d); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.incoming-more > div button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--o-ink, #f4f4f5); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; }
.incoming-more > div button:hover { background: var(--o-raise, #121214); }

/* Shared categories sit in the normal category list; a small owner chip, no extra section. */
#sidebarCategories .shared-cat { position: relative; }
#sidebarCategories .shared-cat .shared-owner-chip { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--o-raise-2, #1a1a1d); color: var(--o-muted, #a1a1aa); font-size: 10.5px; font-weight: 650; letter-spacing: .02em; }
#sidebarCategories button.is-shared::after, #sidebarCategories .shared-cat::after { content: ""; position: absolute; right: 4px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--o-accent, #3b9eff); opacity: 0; }
/* Slim rail: only a dot on the monogram says "shared". */
body.sidebar-slim #sidebarCategories button.is-shared::after, body.sidebar-slim #sidebarCategories .shared-cat::after { opacity: 1; }
body.sidebar-slim #sidebarCategories .shared-cat .shared-owner-chip { display: none; }
#sidebarCategories button.is-shared > small::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: var(--o-accent, #3b9eff); vertical-align: middle; }

/* Top bar: Incoming appears only when something waits. */
.incoming-toggle { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--o-ink-2, #d4d4d8); cursor: pointer; }
.incoming-toggle[hidden] { display: none; }
.incoming-toggle svg { width: 22px; height: 22px; }
.incoming-toggle:hover { background: var(--o-raise-2, #1a1a1d); }
.incoming-badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--o-accent, #3b9eff); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; }

/* Category page: a quiet Share button beside Edit category. */
.share-project-button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--o-line-strong, #333338); border-radius: 999px; background: none; color: var(--o-ink-2, #d4d4d8); font: inherit; font-size: 14px; cursor: pointer; }
.share-project-button[hidden] { display: none; }
.share-project-button svg { width: 18px; height: 18px; }
.share-faces { display: inline-flex; }
.share-faces i { display: grid; place-items: center; width: 22px; height: 22px; margin-left: -6px; border: 2px solid var(--o-bg, #000); border-radius: 50%; background: var(--o-raise-2, #1a1a1d); color: var(--o-ink, #f4f4f5); font-size: 9.5px; font-style: normal; font-weight: 700; }
.share-faces i:first-child { margin-left: 0; }
@media (max-width: 520px) { .share-project-button .share-word { display: none; } .share-project-button { padding: 0 9px; } }

/* Share sheet */
.share-invite { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.share-invite select { width: auto; }
.share-invite button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; font: inherit; font-size: 15px; cursor: pointer; }
@media (max-width: 520px) { .share-invite { grid-template-columns: 1fr auto; } .share-invite input { grid-column: 1 / -1; } }
.share-also { margin: 12px 0 0; font-size: 14.5px; }
.share-also > summary { min-height: 36px; display: flex; align-items: center; color: var(--o-muted, #a1a1aa); cursor: pointer; }
.share-also .share-projects { margin-top: 4px; max-height: 260px; overflow: auto; }
.share-people .share-face { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--o-raise-2, #1a1a1d); color: var(--o-ink, #f4f4f5); font-size: 12.5px; font-weight: 700; }
.share-people .share-face.pending { border: 1px dashed var(--o-line-strong, #333338); background: none; color: var(--o-muted, #a1a1aa); }
.share-people li > div { flex: 1; }
.share-people select { flex: none; width: auto; min-height: 34px; padding: 4px 28px 4px 10px; border-radius: 999px; font-size: 14px; }
.share-quiet { min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--o-muted, #a1a1aa); font: inherit; font-size: 14px; cursor: pointer; }
.share-quiet:hover { background: var(--o-raise-2, #1a1a1d); color: var(--o-ink, #f4f4f5); }
.share-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.settings-sharing .share-actions { margin-top: 8px; }
.settings-sharing .share-actions button { min-height: 40px; padding: 0 16px; border: 1px solid var(--o-line-strong, #333338); border-radius: 999px; background: none; color: var(--o-ink, #f4f4f5); font: inherit; cursor: pointer; }
html[data-theme="light"] .share-dialog::backdrop { background: rgba(0, 0, 0, .35); }
/* Keep the category page's Share / Edit buttons clear of the top-bar icons (row view, Incoming, Settings). */
@media (min-width: 721px) {
  body.orbit-v27 .subject-page-toolbar { padding-right: 76px; }
  body.orbit-v27.has-incoming .subject-page-toolbar { padding-right: 120px; }
}
@media (max-width: 720px) {
  body.orbit-v27 .subject-page-toolbar { padding-right: 100px; }
  body.orbit-v27.has-incoming .subject-page-toolbar { padding-right: 150px; }
  body.orbit-v27 .subject-page-toolbar .subject-sticky-identity { min-width: 0; overflow: hidden; }
  body.orbit-v27 .subject-page-toolbar .subject-sticky-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.orbit-v27 .subject-page-toolbar .share-project-button { display: none; }
  /* On a category page the header is tight: Incoming stays on the other pages. */
  body.orbit-v27:has(#view-subject.active) #incomingToggle { display: none; }
  body.orbit-v27.has-incoming:has(#view-subject.active) .subject-page-toolbar { padding-right: 100px; }
}
/* Phone: Share is a quiet line under the category header, so the header keeps its title. */
.subject-share-line { display: none; }
@media (max-width: 720px) {
  .subject-share-line:not([hidden]) { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin: 4px 0 4px; padding: 0 10px 0 6px; border: 0; border-radius: 999px; background: none; color: var(--o-muted, #a1a1aa); font: inherit; font-size: 13.5px; cursor: pointer; }
  .subject-share-line svg { width: 17px; height: 17px; }
}
#copySetupPrompt { min-height: 40px; padding: 0 16px; border: 1px solid var(--o-line-strong, #333338); border-radius: 999px; }

/* Shared with you, on Today */
.shared-today { margin: 28px 0 0; }
.shared-today-head h2 { margin: 0 0 10px; font-size: 18px; font-weight: 650; }
.shared-today-project { padding: 4px 0 10px; border-top: 1px solid var(--o-line, #232326); }
.shared-today-name { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; color: var(--o-ink, #f4f4f5); font: inherit; font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; box-shadow: none; }
.shared-today-name small { font-weight: 400; font-size: 13.5px; color: var(--o-muted, #a1a1aa); }
.shared-today-name > span:last-child { margin-left: auto; color: var(--o-muted, #a1a1aa); }
.shared-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--shared-color, #8b8f98); flex: 0 0 9px; }
.shared-today-list { margin: 0; padding: 0; list-style: none; }
.shared-today-list li { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 0; }
.shared-today-list .task-check { flex: 0 0 auto; }
.shared-today-list .shared-title { flex: 1; min-width: 0; font-size: 15.5px; line-height: 1.35; overflow-wrap: anywhere; }
.shared-today-list small { color: var(--o-muted, #a1a1aa); font-size: 13px; white-space: nowrap; }
.shared-more button { border: 0; background: none; color: var(--o-accent, #3b9eff); font: inherit; font-size: 14.5px; cursor: pointer; padding: 0 0 0 36px; box-shadow: none; }
.shared-today-empty { margin: 0 0 6px; font-size: 14px; color: var(--o-muted, #a1a1aa); }
.shared-today-list .task-check { display: inline-grid; place-items: center; width: 24px; height: 24px; min-width: 24px; min-height: 24px; margin: 0; padding: 0; border: 2px solid var(--o-muted, #8a8f98); border-radius: 50%; background: none; cursor: pointer; box-shadow: none; }
.shared-today-list .task-check:hover { border-color: var(--o-accent, #3b9eff); }
/* Family members inside a shared Family project */
.shared-family { margin: 4px 0 16px; padding: 12px 14px; border: 1px solid var(--o-line, #232326); border-radius: 14px; }
.shared-family h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--o-ink-2, #d4d4d8); }
.shared-people { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; padding: 0; list-style: none; }
.shared-people li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--o-surface-2, #18181b); font-size: 14px; }
.shared-person-initial { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--o-line-strong, #333338); font-size: 11px; font-weight: 600; }
.shared-family-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.shared-family-add input { min-height: 40px; }
.shared-family-add button { min-height: 40px; padding: 0 16px; border-radius: 999px; font: inherit; font-size: 14px; cursor: pointer; }
.shared-family .share-hint { margin-top: 8px; }
.shared-add.has-person { grid-template-columns: 1fr auto auto auto; }
.shared-add select { min-height: 44px; max-width: 140px; }
@media (max-width: 520px) { .shared-add.has-person { grid-template-columns: 1fr 1fr; } .shared-add.has-person #sharedAddTitle { grid-column: 1 / -1; } }

/* Settings → Your account, Everyone's usage, Delete my account (public/my-account.mjs) */
.settings-account .account-line { margin: 4px 0 8px; font-size: 14.5px; line-height: 1.5; color: var(--o-ink-2, #d4d4d8); }
.settings-account .share-actions { margin-top: 10px; }
.settings-account .share-hint a, .share-dialog .share-hint a { color: var(--o-accent, #3b9eff); }
.share-actions button.danger-fill { border-color: transparent; background: var(--o-p1, #ff7b7b); color: #1a0505; font-weight: 600; }
.share-actions button.danger-fill:disabled { opacity: .45; cursor: not-allowed; }
.usage-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.usage-totals li { padding: 10px 12px; border: 1px solid var(--o-line, #26262b); border-radius: 12px; }
.usage-totals b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.usage-totals small { color: var(--o-muted, #a1a1aa); font-size: 12.5px; }
.usage-table { width: 100%; margin: 14px 0 0; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.usage-table th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--o-muted, #a1a1aa); padding: 6px 6px 6px 0; border-bottom: 1px solid var(--o-line, #26262b); }
.usage-table td { padding: 8px 6px 8px 0; border-bottom: 1px solid var(--o-line, #26262b); vertical-align: top; }
.usage-table td small { display: block; color: var(--o-muted, #a1a1aa); font-size: 12px; word-break: break-all; }
.usage-table th:not(:first-child), .usage-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.share-invite-orbit { margin: 0 0 6px; }
