/* VS Family · Дела v2: мягкие секции как у «Медицины» */
#tasksHost .tv2-header{border-radius:0 0 24px 24px}
#tasksHost .tv2-content{max-width:800px;padding-top:15px}
#tasksHost .tv2-hub{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:24px}
#tasksHost .tv2-hub-card{display:flex;align-items:center;min-width:0;gap:10px;text-align:left;
  border:1px solid var(--color-border);border-radius:19px;padding:13px 12px;
  box-shadow:var(--shadow-card);background:var(--color-surface);color:var(--color-text);
  margin:0;cursor:pointer;font-family:var(--ff);min-height:74px}
#tasksHost .tv2-hub-card.tv2-reminder-due{border-color:var(--color-accent-border-soft);background:var(--color-accent-surface);}
#tasksHost .tv2-hub-card>span:nth-child(2){flex:1;min-width:0}
#tasksHost .tv2-hub-card b{display:block;font-size:13px;line-height:1.3;font-weight:650;color:var(--color-text)}
#tasksHost .tv2-hub-card small{display:block;color:var(--color-text-muted);font-size:10.5px;margin-top:5px;
  line-height:1.4;overflow-wrap:anywhere}
#tasksHost .tv2-hub-icon{width:37px;height:37px;display:grid;place-items:center;flex-shrink:0;
  border-radius:13px;background:var(--color-accent-surface);font-size:19px}
#tasksHost .tv2-hub-arrow{flex:none;color:var(--color-text-muted);font-size:22px;font-weight:300}
#tasksHost .tv2-section-head{display:flex;gap:7px;align-items:center;padding:0 3px 8px}
#tasksHost .tv2-section-head h2{font-size:15.5px;font-weight:700;margin:0;color:var(--color-text)}
#tasksHost .tv2-section-head span{font-size:11px;color:var(--color-text-muted);font-weight:600}
#tasksHost .tv2-filters{background:var(--color-surface-2);border-radius:14px;padding:4px;
  margin-bottom:10px;overflow-x:auto;scrollbar-width:none;gap:3px}
#tasksHost .tv2-filters button{flex:1;border:0;border-radius:10px;padding:9px 9px;min-width:max-content;
  background:transparent;color:var(--color-text-muted);font-size:12px;box-shadow:none}
#tasksHost .tv2-filters button.selected{background:var(--color-surface);box-shadow:var(--shadow-card);color:var(--color-text)}
#tasksHost .tv2-filters .tasks-refresh{margin-left:0;flex:none;padding:7px 10px;font-size:18px}
#tasksHost .tv2-sort-hint{font-size:11px;padding:2px 4px 10px;line-height:1.4}
#tasksHost #tasksRows{display:flex;flex-direction:column;gap:9px}
#tasksHost .tv2-card{display:grid;grid-template-columns:36px minmax(0,1fr) auto;
  gap:4px 10px;align-items:start;position:relative;
  padding:14px 12px 13px;border:1px solid var(--color-border);border-radius:20px;
  background:var(--color-surface);box-shadow:var(--shadow-card);
  transition:box-shadow .15s, transform .15s}
#tasksHost .tv2-card.tv2-sortable{grid-template-columns:30px 36px minmax(0,1fr) auto;gap:4px 7px}
#tasksHost .tv2-card.tv2-moving{z-index:8;transform:scale(1.012);box-shadow:0 10px 30px var(--color-accent-shadow);
  border-color:var(--color-accent)}
#tasksHost .tv2-card[hidden],#tasksHost #tv2Landing[hidden],#tasksHost #tv2Detail[hidden]{display:none!important}
#tasksHost .tv2-record-icon{grid-column:1;grid-row:1;display:grid;place-items:center;align-self:start;
  width:36px;height:36px;border-radius:12px;background:var(--color-accent-surface);
  color:var(--color-accent-text);font-size:17px}
#tasksHost .tv2-card.tv2-sortable .tv2-record-icon{grid-column:2}
#tasksHost .tv2-record-info{grid-column:2;grid-row:1;min-width:0;align-self:center}
#tasksHost .tv2-card.tv2-sortable .tv2-record-info{grid-column:3}
#tasksHost .tv2-record-title{margin:1px 0 0;font-size:13.5px;line-height:1.45;
  font-weight:590;color:var(--color-text);white-space:pre-wrap;overflow-wrap:anywhere}
#tasksHost .tv2-record-title p{margin:0 0 2px}
#tasksHost .tv2-record-title p:last-child{margin-bottom:0}
#tasksHost .tv2-format-line{padding-left:6px}
#tasksHost .tv2-meta{font-size:10.5px;color:var(--color-text-muted);margin:5px 0 0;line-height:1.35}
#tasksHost .tv2-open-hint{font-size:11.5px;color:var(--color-accent-text);margin:8px 0 0}
#tasksHost .tv2-clickable{cursor:pointer}
#tasksHost .tv2-clickable:active,#tasksHost .tv2-hub-card:active{transform:scale(.99)}
#tasksHost .tv2-actions{grid-column:3;grid-row:1;display:flex;align-items:flex-start;gap:6px;
  justify-self:end;flex-shrink:0}
#tasksHost .tv2-card.tv2-sortable .tv2-actions{grid-column:4}
#tasksHost .tv2-complete{min-height:40px;min-width:83px;padding:7px 10px;margin:0;
  color:var(--color-accent-text);background:var(--color-accent-surface);
  border:1px solid var(--color-accent-border-soft);border-radius:12px;font-size:11.5px;font-weight:700}
#tasksHost .tv2-delete{background:transparent;color:var(--color-text-muted-2);border:0;
  border-radius:8px;padding:5px 6px;margin:-5px -4px 0 0;
  font-size:18px;min-width:28px;min-height:28px}
#tasksHost .tv2-delete:hover{background:var(--color-danger-surface);color:var(--color-danger-text)}
#tasksHost .tv2-move-controls{grid-column:1;grid-row:1 / span 2;display:flex;flex-direction:column;
  align-items:center;gap:2px;justify-content:start;margin-top:-3px}
#tasksHost .tv2-grip{width:28px;height:28px;display:grid;place-items:center;
  border-radius:9px;border:1px solid var(--color-border);background:var(--color-surface-2);
  color:var(--color-text-muted);font-size:20px;line-height:1;cursor:grab;
  touch-action:none;user-select:none;-webkit-user-select:none;padding:0;margin:0}
#tasksHost .tv2-grip:active{cursor:grabbing}
#tasksHost .tv2-move-btn{width:25px;height:20px;line-height:1;font-size:13px;margin:0;
  border:0;background:transparent;color:var(--color-text-muted);padding:0}
#tasksHost .tv2-move-btn:active{color:var(--color-accent-text)}
#tasksHost .tv2-empty{display:block;text-align:center;border:1px dashed var(--color-border);
  border-radius:20px;background:var(--color-surface);padding:35px 22px;
  color:var(--color-text-muted);font-size:13px;line-height:1.5}
#tasksHost .tv2-empty p{margin:0}
#tasksHost .tv2-detail-header{padding:16px 20px 24px;border-radius:0 0 24px 24px;
  background:var(--gradient-header);color:var(--color-text-on-accent)}
#tasksHost .tv2-back{display:inline-flex;align-items:center;border:0;background:rgba(255,255,255,.13);
  border-radius:10px;padding:9px 12px;margin:0 0 14px;color:white;font-size:12px;font-weight:600}
#tasksHost .tv2-detail-header h2{font-size:21px;line-height:1.25;font-weight:720;margin:0;color:white}
#tasksHost .tv2-detail-header p{font-size:12px;line-height:1.45;opacity:.82;margin:5px 0 0}
#tasksHost .tv2-detail-main{display:flex;flex-direction:column;gap:9px;min-height:200px}
#tasksHost .tv2-detail-status{padding:0 20px 10px;font-size:12px;color:var(--color-accent-text)}
#tasksHost .tv2-muted{font-size:12px;color:var(--color-text-muted);padding:14px}
#tasksHost .tv2-item-add{display:flex;gap:8px;padding:10px 0 16px}
#tasksHost .tv2-item-add input{flex:1;min-width:0;border:1px solid var(--color-border-input);
  background:var(--color-surface);color:var(--color-text);border-radius:12px;padding:11px;
  font:inherit;font-size:13px}
#tasksHost .tv2-item-add button{margin:0;min-width:44px;min-height:44px;
  background:var(--color-accent);color:var(--color-text-on-accent);font-size:20px;border-radius:12px}
#tasksHost .tv2-item{display:flex;align-items:center;gap:9px;background:var(--color-surface);
  border:1px solid var(--color-border);border-radius:14px;padding:9px 12px;min-height:49px;
  box-shadow:var(--shadow-card)}
#tasksHost .tv2-item-toggle{margin:0;width:34px;height:34px;min-width:34px;padding:3px;
  background:none;border:0;color:var(--color-accent-text);font-size:24px}
#tasksHost .tv2-item-body{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13.5px;line-height:1.4}
#tasksHost .tv2-item-done .tv2-item-body{text-decoration:line-through;color:var(--color-text-muted)}
#tasksHost .tv2-item-remove{margin:0;padding:4px;width:29px;height:30px;
  background:transparent;border:0;color:var(--color-text-muted);font-size:19px}
#tasksHost .tv2-done-items{background:var(--color-surface-2);border-radius:16px;padding:8px 10px}
#tasksHost .tv2-done-items summary{padding:7px 4px;cursor:pointer;font-size:12px;
  font-weight:600;color:var(--color-text-muted)}
#tasksHost .tv2-done-items .tv2-item{margin:6px 0;box-shadow:none}
#tasksHost .tv2-composer{border-radius:23px;max-width:520px}
#tasksHost .tv2-composer #tasksBody{min-height:70px;max-height:170px}
#tasksHost .tv2-format{display:flex;gap:6px;flex-wrap:wrap;margin:7px 0 5px}
#tasksHost .tv2-format[hidden]{display:none}
#tasksHost .tv2-format button{padding:6px 9px;margin:0;background:var(--color-surface-2);
  border:1px solid var(--color-border);border-radius:9px;color:var(--color-text-muted);
  font-family:var(--ff);font-size:11px}
#tasksHost .tv2-settings{border-top:1px solid var(--color-border);margin-top:9px;padding-top:7px}
#tasksHost .tv2-settings>summary{color:var(--color-text-muted);font-size:12px;
  list-style:none;padding:9px 2px}
#tasksHost .tv2-settings>summary::-webkit-details-marker{display:none}
#tasksHost .tv2-settings>summary span{float:right}
#tasksHost .tv2-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;
  padding:7px 0 6px;margin:0}
#tasksHost .tv2-settings-grid label{font-size:11.5px;line-height:1.35}
#tasksHost .tv2-settings-grid label[hidden]{display:none}
#tasksHost .tv2-repeat-row{display:flex!important;align-items:center;gap:8px;
  grid-column:1 / -1;padding:5px 2px;font-size:12px;font-weight:600;color:var(--color-text)}
#tasksHost .tv2-repeat-row[hidden]{display:none!important}
#tasksHost .tv2-repeat-row input{height:18px;width:18px;min-height:18px;margin:0;accent-color:var(--color-accent)}
#tasksHost .tv2-settings-grid input:not([type=checkbox]),#tasksHost .tv2-settings-grid select{
  background:var(--color-surface);color:var(--color-text);border-radius:10px;
  border:1px solid var(--color-border-input);padding:8px;font-size:12.5px;min-height:38px}
#tasksHost .tv2-settings-grid #tv2CustomRow{grid-column:1 / -1}
#tasksHost .tv2-composer .tasks-save-row{margin-top:12px}
#tasksHost button:focus-visible,#tasksHost input:focus-visible,#tasksHost textarea:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}
@media(max-width:720px){
 #tasksHost .tv2-hub{gap:8px}
 #tasksHost .tv2-hub-card{padding:11px 9px;gap:7px;min-height:66px}
 #tasksHost .tv2-hub-icon{height:32px;width:32px;font-size:18px}
 #tasksHost .tv2-hub-card b{font-size:12px}
 #tasksHost .tv2-hub-card small{font-size:10px}
 #tasksHost .tv2-card.tv2-sortable{grid-template-columns:27px 30px minmax(0,1fr) auto;
   padding:12px 8px;gap:4px 5px}
 #tasksHost .tv2-record-icon{width:30px;height:30px}
 #tasksHost .tv2-record-title{font-size:12.7px}
 #tasksHost .tv2-complete{min-width:72px;min-height:40px;padding:6px 6px;font-size:11px}
 #tasksHost .tv2-actions{gap:2px}
 #tasksHost .tv2-delete{width:24px;min-width:24px;padding:3px}
 #tasksHost .tv2-settings-grid{grid-template-columns:1fr;gap:9px}
}
@media(min-width:900px){
 #tasksHost .tv2-content{max-width:850px;padding-top:22px}
 #tasksHost .tv2-hub{max-width:850px}
 #tasksHost .tv2-detail-header{border-radius:26px}
}


/* UX-00e: section/Archive navigation fades in rather than snapping.
   The dialogs are siblings, not descendants; no transform on a page container. */
@keyframes vs-tasks-view-enter{
 from{opacity:.72}
 to{opacity:1}
}
#tasksHost #tv2Landing:not([hidden]),
#tasksHost #tv2Detail:not([hidden]){
 animation:vs-tasks-view-enter 170ms ease-out both;
}
@media(prefers-reduced-motion:reduce){
 #tasksHost #tv2Landing:not([hidden]),
 #tasksHost #tv2Detail:not([hidden]){animation:none}
}

/* UX-00c: отзывчивые карточки раздела «Дела».
   Не анимируем добавление/удаление и порядок DOM: эти операции требуют отдельного FLIP-теста. */
#tasksHost .tv2-hub-card{
  transition:transform 160ms cubic-bezier(.2,.7,.2,1),
             box-shadow 160ms ease-out,
             background-color 160ms ease-out;
}
#tasksHost .tv2-filters button{
  transition:background-color 150ms ease-out,color 150ms ease-out,box-shadow 150ms ease-out;
}
@media(prefers-reduced-motion:reduce){
  #tasksHost .tv2-hub-card,
  #tasksHost .tv2-filters button,
  #tasksHost .tv2-card{
    transition:none;
  }
}

/* v71: quiet microfeedback in checklist rows without slowing the actual toggle.
   Reflows and scroll remain immediate; accessibility setting disables motion. */
#tasksHost .tv2-item{
 transition:background-color 160ms ease-out,box-shadow 160ms ease-out,border-color 160ms ease-out;
}
#tasksHost .tv2-item-toggle{
 transition:background-color 160ms ease-out,color 160ms ease-out;
 border-radius:10px;
}
#tasksHost .tv2-item-toggle:active{background:var(--color-accent-surface)}
@media(prefers-reduced-motion:reduce){
 #tasksHost .tv2-item,#tasksHost .tv2-item-toggle{transition:none}
}

/* Cold entry only: immediate geometry instead of several seconds of text.
   A warm return never reinstates this placeholder. */
#tasksHost .tv3-loading-placeholder{display:flex;flex-direction:column;gap:9px;padding:4px 0}
#tasksHost .tv3-loading-bar{display:block;width:100%;height:42px;border-radius:16px;
 background:var(--color-surface-2);opacity:.8}
#tasksHost .tv3-loading-bar:last-child{width:73%;height:38px;opacity:.53}
@keyframes tv3-skeleton-pulse{50%{opacity:.55}}
@media(prefers-reduced-motion:no-preference){
 #tasksHost .tv3-loading-bar{animation:tv3-skeleton-pulse 1100ms ease-in-out infinite}
}
