/* Compact rows (toolbar button next to Settings, synced as `rowView`): one tight line per task in every list,
   so many more fit on screen. Title, Today marker and priority stay; descriptions, category chips and dates hide. */
body.orbit-v27 .shell-toolbar #rowViewToggle { width: 44px; height: 44px; min-width: 44px; min-height: 44px; margin: 0 0 0 auto; padding: 11px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; color: var(--muted); background: transparent; box-shadow: none; }
body.orbit-v27 .shell-toolbar #rowViewToggle:hover { color: var(--ink); background: var(--pale); }
body.orbit-v27 .shell-toolbar #rowViewToggle[aria-pressed="true"] { color: var(--orbit-accent, #3B9EFF); }
body.orbit-v27 .shell-toolbar #rowViewToggle svg { width: 22px; height: 22px; }
body.orbit-v27 .shell-toolbar #rowViewToggle ~ #openSettings { margin-left: 0 !important; }

body.orbit-v27[data-rows="tight"] .task-row { min-height: 0 !important; padding-top: 7px !important; padding-bottom: 7px !important; align-items: center !important; }
body.orbit-v27[data-rows="tight"] .task-row .task-main { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: flex-start !important; gap: 8px; min-width: 0; width: 100%; text-align: left; }
body.orbit-v27[data-rows="tight"] .task-row .task-title { flex: 0 1 auto; min-width: 0; margin: 0 !important; font-size: 15px !important; line-height: 1.35 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.orbit-v27[data-rows="tight"] .task-row .task-title-button { text-align: left !important; justify-content: flex-start !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
body.orbit-v27[data-rows="tight"] .task-row .task-list-description,
body.orbit-v27[data-rows="tight"] .task-row .task-list-category,
body.orbit-v27[data-rows="tight"] .task-row .task-added,
body.orbit-v27[data-rows="tight"] .task-row .task-main > .task-list-description,
body.orbit-v27[data-rows="tight"] .task-row .task-main > .task-list-category { display: none !important; }
body.orbit-v27[data-rows="tight"] .task-row .task-main > :not(.task-title) { flex: 0 0 auto; width: auto !important; margin: 0 !important; }
body.orbit-v27[data-rows="tight"] .task-row .task-main::before, body.orbit-v27[data-rows="tight"] .task-row .task-main::after { content: none !important; display: none !important; }
body.orbit-v27[data-rows="tight"] .task-row .task-row-meta { flex-direction: row !important; align-items: center !important; gap: 10px !important; }
body.orbit-v27[data-rows="tight"] .task-row > .task-check { margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; align-self: center !important; place-items: center !important; }
body.orbit-v27[data-rows="tight"] .chop-group-head { margin-top: 14px !important; margin-bottom: 4px !important; }

/* Today page: the category choice is a quiet dropdown beside Continue, not a row of pills. */
body.orbit-v27 .chop-start-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
body.orbit-v27 .chop-cat-select select { min-height: 44px; padding: 8px 34px 8px 12px; border-radius: 10px; border: 1px solid var(--o-line, #d6dae1); background-color: transparent; color: var(--ink); font-size: max(16px, 1em) !important; font-weight: 500; }
@media (min-width: 900px) and (pointer: fine) {
  body.orbit-v27[data-rows="tight"] .task-row > .task-check { height: 34px !important; min-height: 34px !important; }
  body.orbit-v27[data-rows="tight"] .task-row { padding-top: 4px !important; padding-bottom: 4px !important; }
}
body.orbit-v27[data-rows="tight"] .task-row > .task-check::before { top: 50% !important; transform: translateY(-50%) !important; }

/* Compact rows: the title comes first. Chips (category, "Waiting on …", agent badges) give up their width
   before the title does and end in "…", and nothing in the row can run under the timer, × or priority
   (Adi, 2026-11-09: long "Waiting on" notes hid titles and slid under the right-hand controls). */
body.orbit-v27[data-rows="tight"] .task-row > .task-main { overflow: hidden; }
body.orbit-v27[data-rows="tight"] .task-row .task-main > .task-title { flex: 0 1 auto !important; min-width: min(6em, 40%); }
body.orbit-v27[data-rows="tight"] .task-row .task-main > :not(.task-title) { flex: 0 1 auto !important; min-width: 0; max-width: min(16em, 35%); }
body.orbit-v27[data-rows="tight"] .task-row .task-main > .task-list-category { flex: 0 0 auto !important; max-width: 9em; }
body.orbit-v27[data-rows="tight"] .task-row .task-main > .task-state { display: block; min-width: 6.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.orbit-v27[data-rows="tight"] .task-row .task-main > .task-list-category::before,
body.orbit-v27[data-rows="tight"] .task-row .task-main > .task-state::before { display: inline-block; margin-right: 5px; vertical-align: 1px; }

/* Compact rows on the opened iPhone Duo and other mid-width screens (Adi, 2026-11-09): the right-hand
   Today marker and priority stay inside the row instead of running off its edge, and every priority
   lines up on the same right edge. */
body.orbit-v27[data-rows="tight"] .task-row .task-row-meta { justify-content: flex-end !important; flex-wrap: nowrap; min-width: 0; }
body.orbit-v27[data-rows="tight"] .task-row .task-row-meta .priority-tap { margin-right: 0 !important; flex: none; }
body.orbit-v27[data-rows="tight"] .task-row .task-row-meta .on-block { flex: none; }

/* The last rows of a list can scroll clear of the round + button instead of ending underneath it. */
body.orbit-v27 main .view.active { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

/* Hovered or tapped task: one soft rounded card over the whole row, from just left of the circle to just right of
   the priority and from the title down past the tags. Margin and padding cancel out, so nothing moves. It replaces the
   older flat grey band that stopped at the circle and the priority. Rows the agent is working on keep their own glow. */
html body.orbit-v27 .task-row:not(.is-with-agent):not(.is-dragging) { transition: background-color .15s ease; }
html body.orbit-v27 .task-row:not(.is-with-agent):not(.is-dragging):hover {
  margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px;
  border-radius: 14px; border-bottom-color: transparent !important; background: rgba(255, 255, 255, .06);
}
html[data-theme="light"] body.orbit-v27 .task-row:not(.is-with-agent):not(.is-dragging):hover { background: rgba(0, 0, 0, .045); }
/* Compact completed rows sit 2px in, so they reach out 10px to keep the text still. */
html body.orbit-v27 .task-row.task-row-done-compact:not(.is-with-agent):not(.is-dragging):hover { margin-left: -10px; margin-right: -10px; }
/* Hide the divider above the card too, so it reads as one piece. */
html body.orbit-v27 .task-row:has(+ .task-row:not(.is-with-agent):not(.is-dragging):hover) { border-bottom-color: transparent !important; }

/* Compact rows are just the circle and the title (Adi, 2026-11-11: "make it easier on the eyes and more simple").
   No category chip, not even on Today, and no priority word: the circle's color already says the priority.
   Category and priority are still one tap away in the task pop-up. */
body.orbit-v27[data-rows="tight"] .task-row .task-list-category,
body.orbit-v27[data-rows="tight"] .task-row .task-main > .task-list-category,
body.orbit-v27[data-rows="tight"] .task-row .task-row-meta .priority-tap,
body.orbit-v27[data-rows="tight"] #chopList .task-row .task-list-category,
body.orbit-v27[data-rows="tight"] #chopList .task-row .priority-tap { display: none !important; }
body.orbit-v27[data-rows="tight"] .task-row .task-main > .task-title { flex: 1 1 auto !important; }
/* Today's drag, timer and × sit quietly at the right edge and only light up on the row you point at,
   so a column of icons doesn't repeat down the list. Touch screens have no hover, so they stay, dimmed. */
body.orbit-v27[data-rows="tight"] #chopList .chop-row-tools { gap: 0; }
body.orbit-v27[data-rows="tight"] #chopList .chop-row-tools > button { color: var(--o-faint, #5d626b); }
@media (hover: hover) and (pointer: fine) {
  body.orbit-v27[data-rows="tight"] #chopList .chop-row-tools { opacity: 0; transition: opacity .12s ease; }
  body.orbit-v27[data-rows="tight"] #chopList .task-row:hover .chop-row-tools,
  body.orbit-v27[data-rows="tight"] #chopList .task-row:focus-within .chop-row-tools { opacity: 1; }
  body.orbit-v27[data-rows="tight"] #chopList .task-row:hover .chop-row-tools > button { color: var(--o-muted, #8a8f98); }
}
/* On a narrow Today list (phones, the Duo front screen) a compact row is one line again: circle, title, tools.
   The chip and priority lines from narrow.css are gone, so their empty grid rows go too. */
@container chop-list (max-width: 459px) {
  body.orbit-v27[data-rows="tight"] #chopList .task-row {
    grid-template-areas: "check title title tools" !important; grid-template-rows: auto !important;
    padding: 6px 0 !important; min-height: 48px !important;
  }
}

/* Long press a task to open it (Adi, 2026-11-11): on touch screens the row darkens a little while pressed, and the
   phone's own text-selection and link menus stay out of the way. */
@media (pointer: coarse) {
  body.orbit-v27 .task-row { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  html body.orbit-v27 .task-row.is-pressing { background: rgba(255, 255, 255, .07); border-radius: 14px; transition: background-color .35s ease; }
  html[data-theme="light"] body.orbit-v27 .task-row.is-pressing { background: rgba(0, 0, 0, .06); }
}

/* Reordering Today (Adi, 2026-11-11): the lifted task floats above the list and follows the pointer, and the
   others slide smoothly out of its way. */
#chopList .is-sorting > [data-task-row]:not(.is-dragging) { transition: transform .18s cubic-bezier(.2, .8, .2, 1) !important; }
html body.orbit-v27 #chopList [data-task-row].is-dragging {
  position: relative; z-index: 20; opacity: 1; transition: box-shadow .15s ease, background-color .15s ease !important;
  margin-left: -12px !important; margin-right: -12px !important; padding-left: 12px !important; padding-right: 12px !important;
  border-radius: 14px; border-bottom-color: transparent !important; background: var(--o-raise-2, #1c1c1f) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06); cursor: grabbing;
}
html[data-theme="light"] body.orbit-v27 #chopList [data-task-row].is-dragging { background: #fff !important; box-shadow: 0 14px 34px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .06); }
#chopList .is-sorting { user-select: none; -webkit-user-select: none; }
/* On a phone, holding a task picks it up, so the ⋮⋮ handle isn't needed on every row. */
@media (pointer: coarse) { body.orbit-v27 #chopList .chop-drag { display: none !important; } }

/* Completed tab: a plain list like Active, with no box and no "Completed (N)" heading or note, because the tab already
   says Completed and its count. Each row shows the whole title on one line (Adi, 2026-11-11). */
body.orbit-v27 #completedTasksPanel { background: none !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; margin: 4px 0 0 !important; box-shadow: none !important; }
body.orbit-v27 #completedTasksPanel > summary, body.orbit-v27 #completedTasksPanel > .completed-note { display: none !important; }
body.orbit-v27 #completedTaskList .task-row { background: transparent; }
/* In compact rows the done line holds the title, so it must not be capped like a chip (that cut titles to a few words). */
body.orbit-v27[data-rows="tight"] .task-row.task-row-done-compact .task-main > .task-done-line { flex: 1 1 auto !important; max-width: none !important; min-width: 0; overflow: hidden; }
