/* One slim header on category pages, in the same row as the menu and settings buttons:
   Back, the category's mark and name, how many tasks are left, and Edit. It stays put while
   the tasks scroll. The big "N Tasks Left" block and the extra label lines are gone. */
body.orbit-v27 .subject-page-toolbar {
  position: sticky; top: 0; z-index: 39;
  height: var(--shell-toolbar-height); min-height: 0;
  margin: calc(-1 * (var(--shell-toolbar-height) + 20px)) 0 12px;
  padding: env(safe-area-inset-top, 0px) 52px 0 44px;
  display: flex; align-items: center; gap: 10px;
  background: transparent; pointer-events: none;
}
body.orbit-v27 .subject-page-toolbar::before { display: none; }
body.orbit-v27 .subject-page-toolbar > * { pointer-events: auto; }
body.orbit-v27 .subject-page-toolbar #closeProject { flex: none; min-height: 36px; padding: 6px 8px; border: 0; background: none; font-size: 14px; color: var(--o-muted); }
body.orbit-v27 .subject-page-toolbar #editCurrentCategory { flex: none; margin-left: auto; min-height: 36px; padding: 6px 10px; border: 1px solid var(--o-line-strong); border-radius: 8px; background: none; font-size: 13px; color: var(--o-ink-2); }
body.orbit-v27 .subject-page-toolbar .subject-sticky-identity { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; }
body.orbit-v27 .subject-page-toolbar .subject-sticky-identity strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 650; color: var(--o-ink); }
body.orbit-v27 .subject-page-toolbar .subject-sticky-photo,
body.orbit-v27 .subject-page-toolbar .subject-sticky-photo.family-identity { width: 32px; height: 32px; min-width: 32px; flex: 0 0 32px; border-radius: 8px; }
body.orbit-v27 .subject-page-toolbar .subject-sticky-photo.is-logo { width: auto; height: 34px; min-width: 34px; max-width: 110px; flex: 0 0 auto; padding: 3px 7px; }
body.orbit-v27 .subject-page-toolbar .subject-sticky-photo.is-logo img { max-width: 96px; }
body.orbit-v27 .subject-page-toolbar .subject-sticky-photo.personal-identity { border-radius: 50%; }
body.orbit-v27 .subject-sticky-count { flex: none; padding: 3px 9px; border-radius: 999px; background: var(--o-accent-soft); color: var(--o-accent-ink); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* The count now lives in the header, so the big block below it goes. */
body.orbit-v27 .subject-page .remaining-progress { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; padding: 0; }
/* "Personal · Health · Admin" label goes; the shortcuts become one row of small chips. */
body.orbit-v27 .subject-page .personal-inside { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
body.orbit-v27 .subject-page .personal-inside > span { display: none; }
body.orbit-v27 .subject-page .personal-inside nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
body.orbit-v27 .subject-page .personal-inside nav button { min-height: 30px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; }
@media (max-width: 720px) {
  body.orbit-v27 .subject-page-toolbar { margin-top: calc(-1 * (var(--shell-toolbar-height) + 17px)); padding-right: 50px; padding-left: 42px; gap: 6px; }
  body.orbit-v27 .subject-page-toolbar #closeProject { padding: 6px 4px; font-size: 0; }
  body.orbit-v27 .subject-page-toolbar #closeProject::before { content: "←"; font-size: 20px; }
  body.orbit-v27 .subject-page-toolbar #editCurrentCategory { padding: 6px 9px; font-size: 0; }
  body.orbit-v27 .subject-page-toolbar #editCurrentCategory::before { content: "Edit"; font-size: 13px; }
  body.orbit-v27 .subject-page-toolbar .subject-sticky-identity strong { font-size: 16px; }
}
/* Other list pages: the "N Tasks Left" block shrinks to one short line. */
body.orbit-v27 .remaining-progress { margin-bottom: 12px; }
body.orbit-v27 .remaining-progress > div { display: flex; align-items: baseline; gap: 6px; }
body.orbit-v27 .remaining-progress strong { font-size: 20px !important; line-height: 1.2; }
body.orbit-v27 .remaining-progress span { font-size: 15px !important; }

/* Pending vs completed: completed tasks sit in their own tinted panel under a clear heading,
   with dimmer text and filled checks, so the open list stays crisp and the two don't blur together. */
body.orbit-v27 .completed-section { margin: 28px 0 0; padding: 4px 14px 8px; border: 1px solid var(--o-line); border-radius: 12px; background: var(--o-raise); }
body.orbit-v27 .completed-section .completed-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; margin: 0; padding: 4px 0; border-bottom: 1px solid var(--o-line); }
body.orbit-v27 .completed-section .completed-list-heading > span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; letter-spacing: .02em; color: var(--o-muted); }
body.orbit-v27 .completed-section .completed-list-heading > span::before { content: "✓"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--o-p3); color: var(--o-bg); font-size: 11px; font-weight: 800; }
body.orbit-v27 .completed-section .completed-task-list:empty { display: none; }
body.orbit-v27 .completed-section .task-row { border-color: var(--o-line); }
body.orbit-v27 .completed-section .task-row:last-child { border-bottom: 0; }
body.orbit-v27 .completed-section .task-row .task-title-button,
body.orbit-v27 .completed-section .task-row .task-title { color: var(--o-faint) !important; }
body.orbit-v27 .completed-section .task-row .task-title-button { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--o-faint) 55%, transparent); text-decoration-thickness: 1px; }
body.orbit-v27 .completed-section .task-row.is-expanded .task-title-button { text-decoration: none; }
body.orbit-v27 .completed-section .task-row > .task-check::before { content: "✓" !important; display: grid !important; place-items: center; background: var(--o-p3) !important; border-color: var(--o-p3) !important; color: var(--o-bg) !important; font-size: 11px !important; font-weight: 800; line-height: 1 !important; }

/* One badge shape for every category in the sticky bar: a 32px circle that always fits the
   row. Photos fill it; logos sit inside with breathing room on their own background, never
   scaled or cropped (the old wide logo box and the 1.16 zoom got cut off when scrolling). */
body.orbit-v27 .subject-page-toolbar .subject-sticky-identity .subject-sticky-photo,
body.orbit-v27 .subject-page-toolbar .subject-sticky-identity .subject-sticky-photo.is-logo,
body.orbit-v27 .subject-page-toolbar .subject-sticky-identity .subject-sticky-photo.protocol-logo,
body.orbit-v27 .subject-page-toolbar .subject-sticky-identity .subject-sticky-photo.family-identity,
body.orbit-v27 .subject-page-toolbar .subject-sticky-identity .subject-sticky-photo.personal-identity { display: grid !important; place-items: center; box-sizing: border-box; width: 32px !important; height: 32px !important; min-width: 32px !important; max-width: 32px !important; flex: 0 0 32px !important; padding: 0 !important; border-radius: 50% !important; overflow: hidden; border: 1px solid var(--o-line, #2a2a2e) !important; }
body.orbit-v27 .subject-page-toolbar .subject-sticky-identity .subject-sticky-photo img { width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; transform: none !important; border-radius: 0 !important; }
body.orbit-v27 .subject-page-toolbar .subject-sticky-identity .subject-sticky-photo.is-logo img,
body.orbit-v27 .subject-page-toolbar .subject-sticky-identity .subject-sticky-photo.protocol-logo img { width: 74% !important; height: 74% !important; object-fit: contain; background: transparent !important; padding: 0 !important; }
body.orbit-v27 .subject-page-toolbar .subject-sticky-identity .subject-sticky-photo > span { font-size: 12px; font-weight: 700; }

/* Tasks left, big and always in view: in the sticky top bar on Tasks and on category pages. */
.toolbar-tasks-left[hidden] { display: none !important; }
body.orbit-v27 .shell-toolbar .toolbar-tasks-left { display: inline-flex; align-items: baseline; gap: 6px; margin-left: auto; padding: 4px 14px; border-radius: 999px; background: var(--o-accent-soft, rgba(10, 132, 255, .14)); color: var(--o-accent-ink, #6cb2ff); }
body.orbit-v27 .shell-toolbar .toolbar-tasks-left:not([hidden]) + #openSettings { margin-left: 0; }
body.orbit-v27 .toolbar-tasks-left b, body.orbit-v27 .subject-sticky-count b { font-size: 26px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
body.orbit-v27 .toolbar-tasks-left span { font-size: 14px; font-weight: 650; }
body.orbit-v27 .subject-page-toolbar .subject-sticky-count { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 12px; font-size: 14px; }
@media (max-width: 520px) {
  body.orbit-v27 .toolbar-tasks-left b, body.orbit-v27 .subject-sticky-count b { font-size: 22px; }
}

/* Category page: address and photo credit at readable sizes (were 12px / 10px and tucked under the header line). */
body.orbit-v26 .subject-location { margin: 6px 0 22px; font-size: 15px; letter-spacing: 0; }
body.orbit-v26 .subject-location p { font-size: 16px; line-height: 1.45; margin: 0 0 4px; }
body.orbit-v26 .subject-location small { font-size: 14px; line-height: 1.45; }
@media (max-width: 599px) { body.orbit-v26 .subject-location p { font-size: 15px; } body.orbit-v26 .subject-location small { font-size: 13px; } }

/* Tasks-left count at the top (and the same count on category pages): styled like the selected menu item, a quiet
   charcoal chip with a white number and grey "left", instead of a blue pill. Blue stays for actions and selection. */
body.orbit-v27 .shell-toolbar .toolbar-tasks-left,
body.orbit-v27 .subject-sticky-count { background: rgba(255, 255, 255, .08); color: var(--o-muted, #a1a1aa); border-radius: 12px; padding: 6px 14px; gap: 6px; }
body.orbit-v27 .toolbar-tasks-left b, body.orbit-v27 .subject-sticky-count b { color: var(--o-ink, #f4f4f5); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
body.orbit-v27 .toolbar-tasks-left span { font-size: 14px; font-weight: 500; }
html[data-theme="light"] body.orbit-v27 .shell-toolbar .toolbar-tasks-left,
html[data-theme="light"] body.orbit-v27 .subject-sticky-count { background: rgba(0, 0, 0, .05); }
/* While the sync banner shows, the category header sits below it instead of sliding up over it (2026-11-24). */
body.orbit-v27 #mainContent:has(> #bridgeStatus:not(.bridge-quiet):not([hidden])) .subject-page-toolbar { margin-top: 0 !important; }
