#todos {font:16px Arial,Helvetica,sans-serif} #todos h2 {font-size:26px;margin:0} #todos h3 {margin:0;font-size:20px}
#todos button {width:auto;min-height:30px;margin:0;padding:5px 10px;font:700 15px Arial,Helvetica,sans-serif;border-radius:5px}
#todos input,#todos select,#todos textarea {font:inherit;padding:5px 7px;min-height:30px;border-radius:4px}
#todos label {font-size:14px;margin:0;font-weight:normal} #todos textarea {min-height:100px;resize:vertical}
.todo-heading,.todo-toolbar,.todo-form-row,.todo-controls,.todo-priority-controls,.todo-day-filters {display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.todo-category-filters {display:flex;align-items:center;gap:5px;margin-top:8px;font-size:14px}
.todo-period-filters {display:flex;align-items:center;gap:5px;font-size:14px}
#todos [data-period][aria-pressed="false"] {background:#e9eef7;color:#243550}
#todos .todo-category,#todos .todo-category-heading {text-align:center}
.todo-heading {margin-bottom:10px} #todoCount {margin-left:auto;color:#526071;font-size:15px}
.todo-toolbar {padding:8px;background:#f5f7fb;border:1px solid #d8dde8;border-radius:8px;align-items:end}
.todo-search {flex:1;min-width:250px;max-width:600px;margin-left:8px!important} #todoSearch {width:100%}
.todo-controls {margin:8px 0;gap:20px} .todo-priority-controls,.todo-day-filters {gap:5px;font-size:14px}
#todos [data-person][aria-pressed="false"],#todos [data-day][aria-pressed="false"],#todos [data-category][aria-pressed="false"] {background:#e9eef7;color:#243550}
#todos [data-move] {font-size:22px;line-height:1;width:32px;height:30px;padding:0}
.todo-help {display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:13px;color:#526071;margin:5px 0 8px;min-height:20px}
#todoMessage {color:#334155} #todos #todoUndo {font-size:13px;min-height:24px;padding:2px 7px}
.todo-table-wrap {overflow:auto;max-height:65vh}
#todos table {width:100%;border-collapse:collapse;table-layout:fixed;min-width:1180px;background:white}
#todos th {position:sticky;top:0;background:#111827;color:white;text-align:left;z-index:1;padding:5px;font-size:15px;line-height:1.1;white-space:nowrap}
#todos th button {background:transparent;padding:0;color:inherit;font-weight:bold;min-height:0;font-size:15px}
#todos td {font-size:16px;line-height:1.1;padding:2px 5px;border:1px solid #ccc;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#todos th:nth-child(1) {width:65px} #todos th:nth-child(3) {width:58px}
#todos .todo-quick-heading,#todos .todo-deadline-heading {width:28px;text-align:center} #todos td.todo-deadline {text-align:center} #todos .todo-group-heading {width:74px;white-space:normal}
#todos .todo-follow-heading {width:112px} #todos .todo-category-heading {width:45px} #todos .todo-complete-heading {width:75px}
#todos .todo-audit-heading {width:115px} #todos .todo-audit-heading[hidden] {display:none}
#todos.todo-completed-view table {min-width:1410px}
#todos td.todo-name {font-weight:600}
#todos td.todo-completion,#todos td.todo-group,#todos td.todo-quick,#todos .todo-group-heading,#todos .todo-quick-heading,#todos .todo-complete-heading {text-align:center}
.todo-form-groups {display:flex;gap:20px;margin:0 0 12px} #todos .todo-form-groups label {display:flex;align-items:center;gap:6px}
#todos input[type=checkbox] {appearance:auto;width:16px;min-width:16px;height:16px;min-height:16px;margin:0;padding:0;vertical-align:middle;cursor:pointer}
#todos .todo-complete-label {display:flex;align-items:center;gap:6px;margin-bottom:10px}
#todos .todo-follow-button {height:25px;min-height:25px;max-width:100%;padding:1px 5px;font-size:15px;background:#eef3fb;color:#17427b;border:1px solid #bdcce3}
#todos tbody tr[data-id] {cursor:pointer} #todos tbody tr:hover {background:#f5f8ff}
#todos tbody tr.focused-row {outline:2px solid #2563eb;outline-offset:-2px;background:#eaf2ff}
#todos tbody tr:focus-visible {outline:2px solid #2563eb;outline-offset:-2px}
body:has(#todos) .header {display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;font-size:26px}
body:has(#todos) .header>span {display:flex;align-items:center;gap:10px;font-size:14px!important}
body:has(#todos) .header button {width:auto;font-size:14px;padding:7px 12px;margin:0}
#todoTopScroll {overflow-x:auto;height:14px} #todoTopScroll div {height:1px}
#todos dialog {width:min(760px,90vw);max-height:85vh;overflow:auto;border:1px solid #b8c3d0;border-radius:8px;padding:18px}
#todos dialog::backdrop {background:#0006} #todoForm>label,#todoForm>.todo-form-row {margin-bottom:12px}
.todo-form-row label {flex:1;min-width:110px} #todoSource {margin-top:15px} #todoSource dt {font-weight:bold} #todoSource dd {margin:3px 0 10px;white-space:pre-wrap;overflow-wrap:anywhere}
#todoFormError,#todoFollowError {color:#b91c1c} #todos button:disabled {opacity:.45;cursor:default}
#todos #todoFollowDialog {width:min(440px,90vw)} #todoFollowName {font-size:16px;margin:10px 0;overflow-wrap:anywhere}
.todo-follow-presets,.todo-follow-actions {display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.todo-follow-actions {justify-content:flex-end} #todoFollowDate {margin-top:4px}
@media(max-width:600px) {.todo-search {margin-left:0!important;min-width:100%}.todo-controls {gap:10px}.todo-form-row label {min-width:40%}}

/* One shared view and data model; phone presentation is automatic and page-scoped. */
#todos .todo-mobile-only {display:none}
#todos .todo-control-label {display:contents}
#todos td.todo-list-actions {display:none}
#todos [data-mobile-layout][aria-pressed="false"] {background:#e9eef7;color:#243550}
@media(max-width:767px) {
  body:has(#todos) {padding-bottom:calc(88px + env(safe-area-inset-bottom));font-size:16px}
  body:has(#todos) .container {padding:12px;background:#f7f8fb}
  body:has(#todos) .header {padding:10px 12px;font-size:20px;gap:6px}
  body:has(#todos) .header>span {width:100%;justify-content:space-between;font-size:13px!important}
  body:has(#todos) .header button {min-height:40px}
  body:has(#todos) .bottom-nav {overflow-x:auto;gap:5px;padding:6px 6px calc(6px + env(safe-area-inset-bottom))}
  body:has(#todos) .bottom-nav a,body:has(#todos) .bottom-nav .bottom-nav-toggle {flex:0 0 58px;box-sizing:border-box;font-size:11px;min-height:54px;padding:8px 2px}
  #todos .todo-mobile-only {display:inline-flex}
  #todos .todo-desktop-only {display:none}
  #todos button,#todos input:not([type=checkbox]),#todos select {min-height:44px}
  #todos .todo-heading {gap:6px}
  #todos h2 {font-size:24px} #todoCount {font-size:13px}
  #todos #todoAdd {padding:8px;font-size:14px}
  #todos #todoFilterToggle {margin-bottom:8px;background:#e9eef7;color:#243550}
  .todo-toolbar {gap:6px;padding:8px;align-items:center}
  .todo-search {min-width:100%;max-width:none;margin-left:0!important}
  #todos .todo-controls {gap:10px;align-items:center}
  #todos:not(.todo-filters-expanded) .todo-controls {position:sticky;top:0;z-index:5;background:#f7f8fb;padding:6px 0}
  #todos .todo-category-filters,#todos .todo-period-filters,#todos .todo-day-filters {flex-wrap:wrap}
  #todos:not(.todo-filters-expanded) .todo-category-filters,
  #todos:not(.todo-filters-expanded) .todo-period-filters,
  #todos:not(.todo-filters-expanded) .todo-day-filters,
  #todos:not(.todo-filters-expanded) .todo-controls>label,
  #todos:not(.todo-filters-expanded) .todo-mobile-sort {display:none}
  #todos .todo-mobile-sort {display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:8px 0}
  #todos .todo-mobile-sort select {width:auto;flex:1;min-width:110px}
  #todos .todo-controls>label {display:flex;gap:8px;align-items:center;min-height:44px}
  #todos [data-move] {width:44px;height:44px;font-size:26px}
  #todos .todo-help {font-size:12px}
  #todoTopScroll {display:none!important}
  #todos .todo-table-wrap {overflow:visible;max-height:none}
  #todos table,#todos tbody {display:block;width:100%;min-width:0;background:transparent}
  #todos.todo-completed-view table {min-width:0}
  #todos thead {display:none}
  #todos tbody tr {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:10px;margin-bottom:12px;background:white;border:1px solid #d8dde8;border-radius:10px}
  #todos td {display:block;border:0;padding:0;white-space:normal;overflow:visible;overflow-wrap:anywhere;min-width:0;line-height:1.35}
  #todos .todo-rank {grid-column:1;grid-row:1;font-weight:bold;color:#17427b;font-size:14px}
  #todos .todo-rank::before {content:'Priority '}
  #todos .todo-person {grid-column:2/4;grid-row:1;text-align:right;color:#526071;font-size:14px}
  #todos td.todo-name {grid-column:1/4;grid-row:2;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:18px}
  #todos .todo-edit {flex-shrink:0}
  #todos .todo-comment {grid-column:1/4;grid-row:3;color:#526071;font-size:14px;white-space:pre-wrap}
  #todos .todo-comment:empty {display:none}
  #todos .todo-created-date {grid-column:1/4;grid-row:4;font-size:13px;color:#526071}
  #todos .todo-completed-date {grid-column:1/4;grid-row:5;font-size:13px;color:#526071}
  #todos .todo-created-date::before {content:'Date created: ';font-weight:bold}
  #todos .todo-completed-date::before {content:'Date completed: ';font-weight:bold}
  #todos .todo-control-label {display:flex;min-height:44px;align-items:center;gap:6px;padding:3px;box-sizing:border-box;font-size:13px;cursor:pointer}
  #todos .todo-control-label .todo-mobile-only {display:inline}
  #todos input[type=checkbox] {width:22px;min-width:22px;height:22px;min-height:22px}
  #todos .todo-follow {grid-column:2/4}
  #todos .todo-follow-button {display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;height:auto;font-size:14px;padding:6px}
  #todos .todo-completion {grid-column:2/4}
  #todos .todo-completion label {justify-content:flex-end}
  #todos dialog,#todos #todoFollowDialog {box-sizing:border-box;width:calc(100vw - 16px);max-width:520px;max-height:calc(100dvh - 24px);padding:14px;margin:auto;border-radius:12px}
  #todos dialog .todo-heading {position:sticky;top:-14px;background:white;padding:10px 0;z-index:2}
  #todos .todo-form-row {display:grid;grid-template-columns:1fr 1fr;width:100%;gap:10px}
  #todos .todo-form-row label {min-width:0}
  #todos .todo-form-row label:last-child {grid-column:1/-1}
  #todos .todo-form-groups {flex-wrap:wrap;gap:8px}
  #todos .todo-form-groups label,#todos .todo-complete-label {min-height:44px}
  #todos input,#todos select,#todos textarea {font-size:16px}
}

@media(max-width:767px) {
  #todos .todo-layout-switch {gap:5px;margin:0 0 8px 8px;vertical-align:top}
  #todos.todo-mobile-list .todo-toolbar {padding:0;border:0;background:transparent;margin-top:4px}
  #todos.todo-mobile-list .todo-toolbar>span,#todos.todo-mobile-list .todo-category-filters>span {display:none}
  #todos.todo-mobile-list .todo-category-filters,
  #todos.todo-mobile-list .todo-period-filters,
  #todos.todo-mobile-list .todo-day-filters {display:flex;gap:4px}
  #todos.todo-mobile-list .todo-category-filters {margin-top:4px}
  #todos.todo-mobile-list .todo-controls {position:static;display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:0;margin:4px 0}
  #todos.todo-mobile-list .todo-period-filters {order:0}
  #todos.todo-mobile-list .todo-day-filters {order:1}
  #todos.todo-mobile-list .todo-controls>label {order:2}
  #todos.todo-mobile-list .todo-priority-controls {display:none}
  #todos.todo-mobile-list:not(.todo-filters-expanded) .todo-toolbar,
  #todos.todo-mobile-list:not(.todo-filters-expanded) .todo-category-filters,
  #todos.todo-mobile-list:not(.todo-filters-expanded) .todo-controls {display:none}
  #todos.todo-mobile-list .todo-day-filters {flex-wrap:wrap;width:100%}
  #todos.todo-mobile-list .todo-day-filters button {flex-shrink:0;padding:5px;font-size:12px}
  #todos.todo-mobile-list>.todo-help>.todo-mobile-only {display:none}
  #todos.todo-mobile-list>.todo-help::before {content:'Tap an item for actions · Edit for details';font-size:12px}
  #todos.todo-mobile-list tbody tr {grid-template-columns:minmax(0,1fr) 44px;gap:2px 8px;padding:8px 6px;margin:0;border:0;border-bottom:1px solid #d8dde8;border-radius:0}
  #todos.todo-mobile-list td.todo-name {grid-column:1;grid-row:1;display:block;font-size:16px;line-height:1.3}
  #todos.todo-mobile-list .todo-comment {grid-column:1;grid-row:2;font-size:13px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  #todos.todo-mobile-list .todo-comment:empty {display:none}
  #todos.todo-mobile-list .todo-completion {grid-column:2;grid-row:1/3;align-self:center}
  #todos.todo-mobile-list .todo-completion label {justify-content:center;width:44px;min-height:44px}
  #todos.todo-mobile-list .todo-completion label span {display:none}
  #todos.todo-mobile-list .todo-rank,#todos.todo-mobile-list .todo-person,
  #todos.todo-mobile-list .todo-deadline,#todos.todo-mobile-list .todo-quick,#todos.todo-mobile-list .todo-group,
  #todos.todo-mobile-list .todo-back-burner,#todos.todo-mobile-list .todo-follow,#todos.todo-mobile-list .todo-category,
  #todos.todo-mobile-list .todo-created-date,#todos.todo-mobile-list .todo-completed-date,
  #todos.todo-mobile-list .todo-edit {display:none}
  #todos.todo-mobile-list tr.focused-row .todo-edit {display:inline-flex;float:right;margin:4px 0 4px 8px}
  #todos.todo-mobile-list tr.focused-row .todo-list-actions {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-column:1/3;grid-row:3;gap:4px;margin-top:6px}
  #todos.todo-mobile-list .todo-list-actions button {width:100%;font-size:13px;padding:4px;min-height:44px}
  #todos.todo-mobile-list tr.focused-row .todo-deadline {display:block;grid-column:1;grid-row:4}
  #todos.todo-mobile-list tr.focused-row .todo-quick {display:block;grid-column:2;grid-row:4}
  #todos.todo-mobile-list tr.focused-row .todo-group {display:block;grid-column:auto;grid-row:auto}
  #todos.todo-mobile-list tr.focused-row {grid-template-columns:repeat(2,minmax(0,1fr))}
  #todos.todo-mobile-list tr.focused-row .todo-name {grid-column:1/3;padding-right:36px}
  #todos.todo-mobile-list tr.focused-row .todo-comment {grid-column:1/3;padding-right:36px}
  #todos.todo-mobile-list tr.focused-row .todo-completion {grid-column:2;justify-self:end}
  #todos.todo-mobile-list tr.focused-row .todo-group:has([data-group-tick="Today"]) {grid-column:1;grid-row:5}
  #todos.todo-mobile-list tr.focused-row .todo-group:has([data-group-tick="Tomorrow"]) {grid-column:2;grid-row:5}
  #todos.todo-mobile-list tr.focused-row .todo-group:has([data-group-tick="Next Week"]) {grid-column:1;grid-row:6}
}

#todos tbody tr.todo-overdue {background:#fee2e2;color:#7f1d1d}
#todos tbody tr.todo-overdue:hover,#todos tbody tr.todo-overdue.focused-row {background:#fecaca}
#todos .todo-overdue-label {display:block;color:#991b1b;font-size:12px;font-weight:bold;margin-top:3px}

#todos .todo-back-burner-heading {width:32px;text-align:center} #todos td.todo-back-burner {text-align:center}
@media(max-width:767px) {
  #todos.todo-mobile-list tr.focused-row .todo-group:has([data-group-tick="Next Month"]) {grid-column:2;grid-row:6}
  #todos.todo-mobile-list tr.focused-row .todo-back-burner {display:block;grid-column:1/3;grid-row:7}
}

#todos .todo-follow-time {display:block;font-size:12px;line-height:1.25;font-weight:600;white-space:nowrap}
#todos .todo-follow-button {line-height:1.2}
#todos tbody tr.todo-due-soon {background:#fef3c7;color:#713f12}
#todos tbody tr.todo-due-soon:hover,#todos tbody tr.todo-due-soon.focused-row {background:#fde68a}
#todos .todo-due-soon .todo-overdue-label {color:#854d0e}
#todos .todo-time-picker {margin:8px 0}
#todos .todo-time-picker input {max-width:180px}
#todos .todo-time-steps {display:flex;gap:5px;flex-wrap:wrap;margin:5px 0}
#todos .todo-time-picker small {color:#555}
@media(max-width:767px) {#todos .todo-time-steps button {min-height:44px}}

#todos .todo-subcategory-filters {display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:6px 0}
#todos .todo-subcategory-filters label {display:flex;align-items:center;gap:6px}
#todos .todo-subcategory-filters label[hidden] {display:none}
#todos select[name=subcategory_id] {max-width:100%}
@media(max-width:767px) {#todos.todo-mobile-list:not(.todo-filters-expanded) .todo-subcategory-filters {display:none}}

/* Compact day headings make room for Wait without widening the table. */
#todos .todo-group-heading {width:58px;font-size:13px;padding:4px 3px}
#todos .todo-group-heading:nth-of-type(n) {white-space:normal}
#todos .todo-wait-heading {width:36px;font-size:13px;text-align:center;padding:4px 3px}
#todos td.todo-group,#todos td.todo-wait {padding:2px 3px;text-align:center}
#todos tbody tr.todo-waiting:not(.todo-overdue):not(.todo-due-soon) {background:#edf8ed}
#todos tbody tr.todo-waiting:not(.todo-overdue):not(.todo-due-soon):hover,#todos tbody tr.todo-waiting:not(.todo-overdue):not(.todo-due-soon).focused-row {background:#ddf1dd}
@media(max-width:767px) {
 #todos.todo-mobile-list .todo-wait {display:none}
 #todos.todo-mobile-list tr.focused-row .todo-wait {display:block;grid-column:1;grid-row:8}
}

/* Main creation action and the additional scheduling group. */
#todos #todoAdd {background:#16803b;color:white;font-size:21px;font-weight:700;min-height:52px;padding:12px 24px;border:2px solid #126b31;margin-left:8px}
#todos #todoAdd:hover {background:#126b31}
#todos .todo-group-heading {width:54px}
#todos #todoDefaults,#todos #todoRefresh {font-size:13px;padding:7px}
@media(max-width:767px) {
 #todos #todoAdd {width:100%;margin:4px 0;font-size:20px}
 #todos.todo-mobile-list tr.focused-row .todo-group:has([data-group-tick="This Week"]) {grid-column:1;grid-row:6}
 #todos.todo-mobile-list tr.focused-row .todo-group:has([data-group-tick="Next Week"]) {grid-column:2;grid-row:6}
 #todos.todo-mobile-list tr.focused-row .todo-group:has([data-group-tick="Next Month"]) {grid-column:1;grid-row:7}
 #todos.todo-mobile-list tr.focused-row .todo-wait {grid-column:2;grid-row:7}
 #todos.todo-mobile-list tr.focused-row .todo-back-burner {grid-row:8}
}

/* Filters occupy their own row so the table has the full viewport width. */
body:has(#todos) .container {max-width:none;padding:12px;box-sizing:border-box}
.todo-work-area {display:flex;flex-direction:column;gap:8px;min-width:0}
.todo-main {width:100%;min-width:0}
#todos .todo-sidebar {order:-1;display:flex;flex-wrap:wrap;gap:12px;padding:12px;background:#f5f7fb;border-radius:8px;min-width:0}
#todos:not(.todo-filters-expanded) .todo-sidebar {display:none}
#todos .todo-sidebar>div,#todos .todo-sidebar>label {flex:1 1 220px}
.todo-topbar {display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:10px 0}
#todos .todo-topbar .todo-priority-controls {display:flex;gap:4px}
#todos .todo-topbar [data-move] {width:40px;min-height:38px}
#todos [hidden],#todos .todo-search[hidden] {display:none!important}
#todoTopScroll {display:none!important}
#todos table,#todos.todo-completed-view table {min-width:0;width:100%;table-layout:fixed}
#todos th,#todos td {box-sizing:border-box}
#todos th {white-space:normal;overflow-wrap:anywhere;padding:4px 2px}
#todos th button {font-size:12px;overflow-wrap:normal}
#todos .todo-group-heading,#todos .todo-wait-heading {overflow-wrap:normal}
#todos.todo-completed-view th:nth-child(4) {width:14%}
#todos th:nth-child(1) {width:3%}
#todos th:nth-child(2) {width:auto}
#todos th:nth-child(3) {width:5%}
#todos th:nth-child(4) {width:18%}
#todos .todo-group-heading {width:5%;font-size:11px}
#todos .todo-quick-heading,#todos .todo-deadline-heading {width:3.5%}
#todos .todo-wait-heading {width:4%}
#todos .todo-follow-heading {width:10%}
#todos .todo-back-burner-heading {width:4%}
#todos .todo-complete-heading {width:5%;font-size:12px}
#todos .todo-audit-heading {width:7%;font-size:11px}
#todos td {white-space:normal;overflow-wrap:anywhere;padding:3px;line-height:1.25}
#todos .todo-follow-button {font-size:11px;white-space:normal;padding:2px}
#todos .todo-follow-time {font-size:11px}
#todos .todo-table-wrap {overflow-x:hidden;max-height:70vh}
#todos td.todo-inline-editor {display:none}
.todo-list-footer {display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:16px 0}
.todo-list-footer a {font-size:14px}
.todo-size-switch {gap:5px;align-items:center;margin:0 0 8px 8px}
#todoSyncStatus {font-size:12px;color:#526071;margin-left:auto}
#todos #todoCancel,#todos .todo-edit {min-height:44px;min-width:90px;background:#334155}
#todoChecklistForm>label {margin:12px 0}
#todoChecklistMembers {display:flex;flex-wrap:wrap;gap:12px;font-size:14px}
#todoChecklistError {color:#b91c1c}
@media(min-width:768px) and (max-width:1050px) {
 #todos td {font-size:13px}
 #todos .todo-group-heading {width:5%;font-size:10px}
 #todos .todo-follow-heading {width:10%}
 #todos .todo-audit-heading {width:7%}
}
@media(max-width:767px) {
 #todos .todo-table-wrap {overflow:visible;max-height:none}
 #todos .todo-sidebar .todo-controls {display:flex;position:static}
 #todos.todo-mobile-list .todo-topbar .todo-priority-controls {display:flex}
 #todos.todo-mobile-list .todo-main>.todo-help>.todo-mobile-only {display:inline}
 #todos.todo-mobile-list .todo-main>.todo-help::before {content:none}
 #todos.todo-mobile-list tr.focused-row .todo-edit {display:inline-flex;align-items:center;justify-content:center;float:right}
 #todos.todo-mobile-list tr.focused-row .todo-name {padding-right:0}
 #todos.todo-mobile-list tr.focused-row .todo-comment {padding-right:0}
 #todos.todo-mobile-list tr.focused-row .todo-completion {grid-row:9;grid-column:1/3;justify-self:stretch}
 #todos.todo-mobile-list tr.focused-row .todo-completion label {width:100%;justify-content:flex-start;gap:8px}
 #todos.todo-mobile-list tr.focused-row .todo-completion label span {display:inline}
 #todos.todo-mobile-list tr.focused-row td.todo-inline-editor {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;grid-column:1/3;grid-row:10}
 #todos.todo-mobile-list .todo-inline-editor label {min-width:0;font-size:13px}
 #todos.todo-mobile-list .todo-inline-editor label:last-child {grid-column:1/3}
 #todos.todo-mobile-list .todo-inline-editor textarea {min-height:70px}
 #todos:not(.todo-mobile-list) tr.focused-row td.todo-inline-editor {display:grid;grid-column:1/4;gap:8px}
 .todo-form-groups {flex-wrap:wrap;gap:10px}
 #todos dialog {box-sizing:border-box;width:calc(100vw - 20px);max-width:760px;padding:12px}
 #todoSyncStatus {width:100%;margin:0}
}

/* List density never hides card details or changes card size. */
@media(max-width:767px) {
 #todos.todo-mobile-list[data-mobile-size] {--todo-title:14px;--todo-note:12px;--todo-padding:3px;--todo-gap:0px;--todo-hit:24px}
 #todos.todo-mobile-list[data-mobile-size="medium"] {--todo-title:13px;--todo-note:11px;--todo-padding:0px;--todo-hit:22px}
 #todos.todo-mobile-list[data-mobile-size="small"] {--todo-title:12px;--todo-note:10px;--todo-padding:0px;--todo-hit:20px}
 #todos [data-mobile-layout][aria-pressed="true"] {background:#17427b;color:white}
 #todos [data-mobile-layout] {min-height:44px}
 #todos.todo-mobile-list[data-mobile-size] tbody tr[data-id]:not(.focused-row) {display:grid;grid-template-columns:minmax(0,1fr) 70px;grid-template-rows:auto auto;gap:0 6px;padding:var(--todo-padding) 6px;margin:0 0 var(--todo-gap);border:1px solid #d8dde8;border-radius:10px;min-height:var(--todo-hit);align-items:center}
 #todos.todo-mobile-list[data-mobile-size] tbody tr[data-id]:not(.focused-row) {margin:0;border:0;border-bottom:1px solid #d8dde8;border-radius:0}
 #todos.todo-mobile-list[data-mobile-size] tbody tr[data-id]:not(.focused-row)>td {display:none}
 #todos.todo-mobile-list[data-mobile-size] tbody tr[data-id]:not(.focused-row)>.todo-name {display:block;grid-column:1;grid-row:1;font-size:var(--todo-title);line-height:1.3;padding:0;align-self:end}
 #todos.todo-mobile-list[data-mobile-size] tbody tr[data-id]:not(.focused-row)>.todo-comment {display:-webkit-box;grid-column:1;grid-row:2;font-size:var(--todo-note);line-height:1.3;padding:0;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;align-self:start}
 #todos.todo-mobile-list[data-mobile-size] tbody tr[data-id]:not(.focused-row)>.todo-comment:empty {display:none}
 #todos.todo-mobile-list[data-mobile-size] tbody tr[data-id]:not(.focused-row)>.todo-completion {display:block;grid-column:2;grid-row:1/3;padding:0;align-self:center;justify-self:stretch}
 #todos.todo-mobile-list[data-mobile-size] tbody tr[data-id]:not(.focused-row) .todo-completion label {width:100%;min-height:var(--todo-hit);display:flex;align-items:center;justify-content:center;gap:4px;padding:0;font-size:var(--todo-note)}
 #todos.todo-mobile-list[data-mobile-size] tbody tr[data-id]:not(.focused-row) .todo-completion label span {display:inline}
 #todos.todo-mobile-list[data-mobile-size] tbody tr[data-id]:not(.focused-row) .todo-edit {display:none}
 #todos:not(.todo-mobile-list) tr.focused-row .todo-edit {display:inline-flex;align-items:center;justify-content:center}
}

/* Compact editors keep the existing typography and remove excess vertical space. */
#todos #todoSetupForm>label {margin:8px 0}
#todoSetupMessage {font-size:14px;white-space:normal}
#todos #todoForm>label,#todos #todoForm>.todo-form-row {margin-bottom:5px}
#todos #todoForm .todo-form-groups {gap:4px 10px;margin-bottom:4px}
#todos #todoForm .todo-complete-label {margin-bottom:2px}
#todos #todoForm textarea {min-height:64px}
#todos #todoForm .todo-time-picker {margin:4px 0}
#todos #todoForm .todo-time-steps {margin:3px 0}
#todos #todoForm .todo-help {margin:3px 0;gap:4px;min-height:0}
#todos #todoFormError:empty {display:none}
@media(max-width:767px) {
 #todos #todoDialog .todo-heading {padding:4px 0;margin-bottom:6px;top:-12px}
 #todos #todoForm .todo-form-row {gap:4px}
 #todos #todoForm input:not([type=checkbox]),#todos #todoForm select {min-height:32px;padding:3px 6px}
 #todos #todoForm .todo-form-groups label,#todos #todoForm .todo-complete-label {min-height:32px}
 #todos #todoForm .todo-time-steps button {min-height:32px;padding:3px 8px}
 #todos tbody tr.focused-row {gap:3px 6px;padding:6px}
 #todos tr.focused-row .todo-control-label {min-height:32px;padding:1px 2px}
 #todos.todo-mobile-list tr.focused-row td.todo-inline-editor,#todos:not(.todo-mobile-list) tr.focused-row td.todo-inline-editor {gap:4px;grid-template-columns:repeat(2,minmax(0,1fr))}
 #todos tr.focused-row .todo-inline-editor label:last-child {grid-column:1/-1}
 #todos tr.focused-row .todo-inline-editor input,#todos tr.focused-row .todo-inline-editor select {min-height:32px;padding:3px 6px;font-size:16px}
 #todos tr.focused-row .todo-inline-editor textarea {min-height:60px;font-size:16px}
 #todos tr.focused-row .todo-list-actions {margin-top:2px;gap:3px}
 #todos tr.focused-row .todo-list-actions button,#todos tr.focused-row .todo-follow-button {min-height:32px}
 #todos:not(.todo-mobile-list) tr:not(.focused-row) .todo-edit {display:none}
}

/* A single row tap exposes the name in place, just like the other editable fields. */
#todos .todo-name-input {display:none}
#todos tr.focused-row .todo-name-text {display:none}
#todos tr.focused-row .todo-name-input {display:inline-block;box-sizing:border-box;width:100%;min-width:0;min-height:32px;padding:3px 6px;font-size:16px}
@media(max-width:767px) {
 #todos tr.focused-row .todo-name {display:flex;align-items:center;gap:6px;flex-wrap:wrap}
 #todos tr.focused-row .todo-name-input {flex:1 1 150px;width:0}
}

/* One completion column heading; compact expanded controls without shrinking type. */
#todos .todo-list-heading {display:none}
@media(max-width:767px) {
 #todos.todo-mobile-list .todo-list-heading {display:flex;justify-content:flex-end;padding:2px 6px;font-size:12px;font-weight:600}
 #todos.todo-mobile-list .todo-list-heading span {width:70px;text-align:center}
 #todos.todo-mobile-list[data-mobile-size] tbody tr[data-id] .todo-completion label span {display:none!important}
 #todos tbody tr.focused-row {gap:1px 6px;padding:4px 6px}
 #todos tbody tr.focused-row>td {padding-top:0;padding-bottom:0}
 #todos tr.focused-row .todo-control-label {min-height:30px;padding:0 2px}
 #todos tr.focused-row .todo-list-actions button {height:32px;min-height:32px}
 #todos tr.focused-row .todo-edit {height:32px;min-height:32px;min-width:70px;margin:0;padding:3px 8px}
 #todos.todo-mobile-list tr.focused-row .todo-edit {margin:0}
 #todos.todo-mobile-list tr.focused-row td.todo-inline-editor,#todos:not(.todo-mobile-list) tr.focused-row td.todo-inline-editor {gap:2px 6px}
 #todos tr.focused-row .todo-inline-editor label {line-height:1.15}
 #todos tr.focused-row .todo-inline-editor input,#todos tr.focused-row .todo-inline-editor select,#todos tr.focused-row .todo-inline-editor textarea {box-sizing:border-box;margin:0}
 #todos tr.focused-row .todo-inline-editor textarea {min-height:48px;padding:3px 6px}
}

@media(max-width:767px) {
 #todos.todo-mobile-list .todo-completion input[type=checkbox] {width:16px;min-width:16px;height:16px;min-height:16px}
}

#todos #todoSetupDays {display:flex;flex-wrap:wrap;gap:6px 12px;margin:8px 0;padding:8px}
#todos #todoSetupDays label {display:flex;align-items:center;gap:5px;min-height:28px}
#todos .todo-list-footer {gap:8px}

#todos .todo-action-menu {position:relative;margin-left:auto}
#todos .todo-action-menu summary {cursor:pointer;list-style:none;padding:6px 10px;font-size:24px;line-height:1;background:#111827;color:white;border-radius:5px}
#todos .todo-action-menu summary::-webkit-details-marker {display:none}
#todos .todo-menu-actions {position:absolute;right:0;top:100%;z-index:1000;display:flex;flex-direction:column;gap:3px;width:250px;max-width:85vw;padding:8px;background:#111827;border-radius:6px;box-shadow:0 4px 14px #0004}
#todos .todo-menu-actions button,#todos .todo-menu-actions a {display:block;box-sizing:border-box;width:100%;text-align:left;background:#1f2937;color:white;padding:10px;font-size:15px;line-height:1.3;text-decoration:none;border:0;border-radius:4px}
.bottom-nav #todoSetup {color:white;background:#1f2937}
.bottom-nav #todoSetup>span {font-size:22px;line-height:1}
